MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: [Help?] Integer/Decimal portion of a real number


It is unlikely that you want to do what you indicated.  You showed the
decimal portion as an integer.  You would have to add some convention to
distinguish between numbers like 4.12345 and 4.012345  

The easiest convention is to keep the decimal point.


x = 4.12345;
IntegerPart[x]
FractionalPart[x]

4

0.12345

Also see on-line help for Round, Floor, and Ceiling.


Bob Hanlon


  • Prev by Date: RE: make 1. x 10^-10 read simpl
  • Next by Date: AxesLabels on the MacOS, mkdk
  • Previous by thread: [Help?] Integer/Decimal portion of a real number
  • Next by thread: Re: [Help?] Integer/Decimal portion of a real number