-
'Looks like you have found something'
I can't take the credit for that, @maze1980 did the groundwork in #9. (unless of course you are referring to comment at L291)
'That just doesn't exist in javascript.'
So original assumption correct, what is the best way to supply the operand to be able to perform this stunt in Javascript? All docs I've read so far indicate use of integers. But aren't integers a representation of what is store using F.P.? hmmmmm
'So while (something << 19) / 32000000 is perfectly valid 64 bit integer operation in C'
But doesn't the divide convert from integer to F.P. for the calculation, introducing rounding error as you so kindly pointed out?
'What's the source of those operations?'
Part of a massive Arduino script I want to see if it possible to run using EspruinoWiFi's, so that those guys don't have all the fun!! ;-)
Math.pow
-> Looks like you have found something:AFAIK all math operations are floating point operations in javascript & Espruino.
So while
(something << 19) / 32000000
is perfectly valid 64 bit integer operation in C, and probably reasonably performant since bit-shifting is supported since forever. That just doesn't exist in javascript.What's the source of those operations?