Looking for a BASIC language for personal use, I downloaded several software (ex: PureBasic-Demo some days ago) and I make small programs-tests in touch with my needs.
To test their "answer" to the mathematical functions, I execute the 3 loops below, by adapting them to the specificities of every language (declarations of variables - value.d - , printings of the results StrD(...), etc...) :
value = 1.0
FOR i=1 TO 10
FOR j=1 TO 1000
FOR k=1 TO 1000
value = Tan(ATan(Pow(10.00,Log10(Sqr(value*value))))) + 1.0
NEXT k
NEXT j
NEXT i
( take in an old "Sky & Telescope" review)
Calculations in all langages are made in "DOUBLE".
I deliver you the main results :
1/in FORTRAN 95 : value = 10000001.000593 , error in % = 0.000010005 [Reference calculation]
2/in GFA-Basic (WinXP) : value = 10000001.001222 , error in % = 0.000010001 [remarkable for a "BASIC"!!]
3/in Visual-Basic6 : value = 9999818.448501 , error in % = 0.001815515 [acceptable]
4/in Emergence BASIC : value = 9999818.448501 , error in % = 0.001815515 [NB: idem than VB6].
5/in XBLite : value = 9999818.448501 , error in % = 0.001815515 [NB: idem than VB6].
To my great surprise, the calculation in PureBasic is FALSE

a/ with "value.f" : value = 4095.73364
b/ with "value.d" : value = 1708221.50000
Is one of you can say myself if I made an error of programming or if it is an "intrinsic" fault in the functions of PureBASIC ?
Thank you in advance for any remark !
Cordially
SosPel