As manual says, Pow is returning a float. It would be nice to get a double for lager results as a native command.
Or did I miss something!?
EDIT: Edited the topic in the near right direction.
Pow returning a double (Documentation update pls)
Pow returning a double (Documentation update pls)
Last edited by Tranquil on Wed Nov 22, 2006 7:51 am, edited 1 time in total.
Tranquil
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
The doc only means that the type returned is a floating point decimal number. If you choose a double to receive the result, the function will fill it correctly up to the capacity of a double. The doc could be tweaked a bit to show that Result.d = Pow(number.f, power.f) is also valid. The result of this Pow function would not fit in a .f type, yet it works properly:
Code: Select all
dog.d = Pow(30000,3)
cat.q = 30000*30000*30000
Debug dog
Debug cat
BERESHEIT
The german documentation also says, that Fred will add a AbsD() function. You now the normal Abs()? It returns the absolute value of a FLOAT number.
The german documentation says explicitly, that a function for Double will follow in one of the next versions.
The german documentation says explicitly, that a function for Double will follow in one of the next versions.
PB 4.30
Code: Select all
onErrorGoto(?Fred)