View previous topic :: View next topic |
Author |
Message |
Guest
|
the math modulus: efficient implementation suggs. |
Posted: Thu Oct 06, 2005 12:27 am |
|
|
hi guyz,
remember in hi school math, we wd use a modulus function to ignore the negative sign. e.g 81- 100 = -19, and mod of (-19) would simply make it +19. this function has not been implemented here but can easily be tackled in code. Whats in ur opinion the most efficient way to go about it? |
|
|
Ttelmah Guest
|
|
Posted: Thu Oct 06, 2005 2:40 am |
|
|
A 'modulus', does not ignore the negative sign. You are mis-remembering your maths. A modulus function, splits a real number, into it's integral, and fractional parts, and is implemented as the 'MODF' function. The mathematical term for the scale of a number (ignoring it's sign), is the 'absolute value', and this is implemented as the 'ABS' function.
Best Wishes |
|
|
Guest
|
|
Posted: Thu Oct 06, 2005 11:10 pm |
|
|
Thanx ! i forgot the name 'absolute'. Im familiar with modulus |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|