Thread: foo^(n/m)
View Single Post
  #9  
Old 10-17-2005, 04:06 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Well most math functions don't allow that, Graal is already accepting more than the basic C++ library functions.
It is true that e.g. -8 = -2 * -2 * -2, so -8^1/3 = -2.
But.
The exponent is specified as one number, not divider and divisor (not sure about the english names for those). While -8 ^1/3 is possible to calculate, -8 ^ 0.333333333 is not, since the precision of floating point numbers is limited and 0.333333333 is not exactly the same like 1/3.
Reply With Quote