Arithmetical power function doesn't work

BlitzMax Forums/BlitzMax Programming/Arithmetical power function doesn't work

BinaryBurst(Posted 2015) [#1]
When I compile this code:
Print (1e300)^(1.0/170)


it gives me:

inf

Why?
It's definitely within the 64bit floating point format... I'm baffled :)


Yasha(Posted 2015) [#2]
Fractional numbers in BlitzMax default to single-precision, not double. You can specify the precision on the numbers and get a double-precision result:

Print (1e300:Double)^(1.0:Double/170:Double)



BinaryBurst(Posted 2015) [#3]
Yup. It worked! Thanks! :)


Codebox(Posted 2015) [#4]
I smell a clicker game, more precise, level progress.. *sniff* :P