MathGroup Archive 1996

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

Search the Archive

Re: Conversion of Real to Integer

  • Subject: [mg3078] Re: Conversion of Real to Integer
  • From: browe at netcom.com (Bill Rowe)
  • Date: 30 Jan 1996 04:08:46 -0600
  • Approved: usenet@wri.com
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: none apparent
  • Sender: daemon at wri.com

In article <4efb89$rp7 at dragonfly.wri.com>, TTCJ34A at prodigy.com (DR JOHN C
ERB) wrote:

>In mathematica, how can one emulate the fortran real to integer 
>conversion functions INT ( ) and
>NINT ()?  An example being: INT(3.6) --> 3 and NINT(3.6) --> 4.  Also,
> how does one convert from integer to real?  Thank you.

The functions Floor and Ceiling do what you want. Floor[3.6] --> 3 and
Ceiling[3.6] --> 4.

-- 
"Against supidity, the Gods themselves contend in vain"


  • Prev by Date: Re: Conversion of Real to Integer
  • Next by Date: ParametricPlot3D
  • Previous by thread: Re: Conversion of Real to Integer
  • Next by thread: Re: Conversion of Real to Integer