Post Reply 
Really really fast BASIC handheld
01-10-2019, 08:54 AM (This post was last modified: 01-10-2019 08:55 AM by ijabbott.)
Post: #6
RE: Really really fast BASIC handheld
(01-10-2019 08:37 AM)berndpr Wrote:  
(01-10-2019 08:16 AM)ijabbott Wrote:  You shouldn't need to use RAD(X). X isn't an angle, so converting it from degrees to radians doesn't make sense.

Yes, I know. But as far as I understand the benchmark is using degree as input for the sin function. For comparing the results I thought I use the same input, even this is mathematical not necessary.

Bernd

But X isn't in degrees or radians. It is the tangent of an angle. SIN(ATAN(X)) is the sine of the same angle and should give the same result (subject to minor rounding errors) on a calculator set to degrees or radians. By replacing X with RAD(X) you are passing the wrong values to the SIN(ATAN(x)) function.

I'm not sure if the benchmark specifies degrees or radians mode to be used. There might be a slight difference in speed between the two for a particular machine, but the final resulting value should be more or less the same (subject to accumulated rounding errors).

— Ian Abbott
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Really really fast BASIC handheld - ijabbott - 01-10-2019 08:54 AM



User(s) browsing this thread: 1 Guest(s)