MathGroup Archive 1997

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8877] Re: [mg8847] [Help?] Integer/Decimal portion of a real number
  • From: BobHanlon at aol.com
  • Date: Tue, 30 Sep 1997 20:16:42 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

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