ok, incoming Bug Report
This is a rather simplistic script, but I believe it gathers enough information. This Bug is related to math. I will try to spend some time doing some more comprehensive math function coverage. However I was trying to do some division and ran into some problems. I tried different functions and came out with other problems so I wrote this simple script to gather information about the division functions. This includes using Div, FDiv, Mod, Set Varname (No/No) and Set Varname (No%No). Below is the results and below that is the actual script used.
Edit: I guess I could go ahead and state what is derived from the information below as well... though its pretty obvious from looking at it.
Div Does Not appear to work correctly.
FDiv Does Not appear to work correctly.
Mod Does appear to work correctly.
Set Varname (/) Does appear to work correctly.
and
Set Varname (%) Does appear to work correctly.
Hope this helps
| CODE |
Div 4 2 is 4 FDiv 4 2 is 4.000000 Mod 4 2 is 0 Set SizeOfDrv (4/2) is 2 Set SizeOfDrv (4Mod2) is 0
Div 5 2 is 4 FDiv 5 2 is 5.000000 Mod 5 2 is 1 Set SizeOfDrv (5/2) is 2.5 Set SizeOfDrv (5Mod2) is 1
Div 2048 1024 is 2048 FDiv 2048 1024 is 2048.000000 Mod 2048 1024 is 0 Set SizeOfDrv (2048/1024) is 2 Set SizeOfDrv (2048Mod1024) is 0
Div 2560 1024 is 2048 FDiv 2560 1024 is 2560.00000 Mod 2560 1024 is 512 Set SizeOfDrv (2560/1024) is 2.500000 Set SizeOfDrv (2560Mod1024) is 512
|
| CODE |
Set SizeOfDrv 4 Div SizeOfDrv 2 Set OutPut "Div 4 2 is %SizeOfDrv%$eol$" Set SizeOfDrv 4 FDiv SizeOfDrv 2 Set OutPut "%OutPut%FDiv 4 2 is %SizeOfDrv%$eol$" Set SizeOfDrv 4 Mod SizeOfDrv 2 Set OutPut "%OutPut%Mod 4 2 is %SizeOfDrv%$eol$" Set SizeOfDrv 4 Set SizeOfDrv %(SizeOfDrv/2)% Set OutPut "%OutPut%Set SizeOfDrv (4/2) is %SizeOfDrv%$eol$" Set SizeOfDrv 4 Set SizeOfDrv %(SizeOfDrv%2)% Set OutPut "%OutPut%Set SizeOfDrv (4Mod2) is %SizeOfDrv%$eol$$eol$" Set SizeOfDrv 5 Div SizeOfDrv 2 Set OutPut "%OutPut%Div 5 2 is %SizeOfDrv%$eol$" Set SizeOfDrv 5 FDiv SizeOfDrv 2 Set OutPut "%OutPut%FDiv 5 2 is %SizeOfDrv%$eol$" Set SizeOfDrv 5 Mod SizeOfDrv 2 Set OutPut "%OutPut%Mod 5 2 is %SizeOfDrv%$eol$" Set SizeOfDrv 5 Set SizeOfDrv %(SizeOfDrv/2)% Set OutPut "%OutPut%Set SizeOfDrv (5/2) is %SizeOfDrv%$eol$" Set SizeOfDrv 5 Set SizeOfDrv %(SizeOfDrv%2)% Set OutPut "%OutPut%Set SizeOfDrv (5Mod2) is %SizeOfDrv%$eol$$eol$" Set SizeOfDrv 2048 Div SizeOfDrv 1024 Set OutPut2 "Div 2048 1024 is %SizeOfDrv%$eol$" Set SizeOfDrv 2048 FDiv SizeOfDrv 1024 Set OutPut2 "%OutPut2%FDiv 2048 1024 is %SizeOfDrv%$eol$" Set SizeOfDrv 2048 Mod SizeOfDrv 1024 Set OutPut2 "%OutPut2%Mod 2048 1024 is %SizeOfDrv%$eol$" Set SizeOfDrv 2048 Set SizeOfDrv %(SizeOfDrv/1024)% Set OutPut2 "%OutPut2%Set SizeOfDrv (2048/1024) is %SizeOfDrv%$eol$" Set SizeOfDrv 2048 Set SizeOfDrv %(SizeOfDrv%1024)% Set OutPut2 "%OutPut2%Set SizeOfDrv (2048Mod1024) is %SizeOfDrv%$eol$$eol$" Set SizeOfDrv 2560 Div SizeOfDrv 1024 Set OutPut2 "%OutPut2%Div 2560 1024 is %SizeOfDrv%$eol$" Set SizeOfDrv 2560 FDiv SizeOfDrv 1024 Set OutPut2 "%OutPut2%FDiv 2560 1024 is %SizeOfDrv%$eol$" Set SizeOfDrv 2560 Mod SizeOfDrv 1024 Set OutPut2 "%OutPut2%Mod 2560 1024 is %SizeOfDrv%$eol$" Set SizeOfDrv 2560 Set SizeOfDrv %(SizeOfDrv/1024)% Set OutPut2 "%OutPut2%Set SizeOfDrv (2560/1024) is %SizeOfDrv%$eol$" Set SizeOfDrv 2560 Set SizeOfDrv %(SizeOfDrv%1024)% Set OutPut2 "%OutPut2%Set SizeOfDrv (2560Mod1024) is %SizeOfDrv%$eol$$eol$" BeginDraw UseCurrent MessageBox "%OutPut%" EndDraw Input BeginDraw UseCurrent MessageBox "%OutPut2%" EndDraw Input |
Let me know if there is something more I need to provide to help isolate this one.
Thanks,
SDG
This post has been edited by SumDumGuy3: Oct 2 2004, 11:57 PM