$ perl -MPOSIX -le ' my($f,$i)=POSIX::modf(3.14); print "f=$f; i=$i";' f=0.14; i=3
That might be more reliable than simple subtraction with negative numbers.
In reply to Re: splitting a decimal number..
by sgifford
in thread splitting a decimal number..
by renz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |