Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I'm adding SQR to my new faster string math routines...
#13
Re sqr(78):
Wolfram Alpha says it's 8.8317608663278468547640427269592539641746394809314178262102029725...
which matches your string math all the way out.

The QB64 value just seems to have an limit-of-precision error due to where calculation stopped before the result was converted to decimal.
QBasic agrees with QB64, while GWBasic sez 8.831760406494141, so GWB is only calculating at single-precision.

(Edited to add: TurboBasic (DOS), FreeBasic, TDM GCC, and Tiny C also agree with QB64 so yeah, it's a double-precision issue.)
Reply


Messages In This Thread
RE: I might add SQR to my string math routines... - by JRace - 08-18-2022, 06:48 PM



Users browsing this thread: 3 Guest(s)