       Re: How to get result in shape of fraction in Mathematica 4.2

• To: mathgroup at smc.vnet.net
• Subject: [mg91599] Re: How to get result in shape of fraction in Mathematica 4.2
• From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
• Date: Thu, 28 Aug 2008 07:40:00 -0400 (EDT)
• Organization: The Open University, Milton Keynes, UK
• References: <g95k9b\$54b\$1@smc.vnet.net>

```b wrote:

> When I calculate something I would like to get result in shape of fraction;
> Like 1/2 not 0.5.
>
> How??

The best method to get exact results is to use infinite precision
numbers , i.e. 314/100 rather than 3.14 or 2 rather than 2. or 2.0

Also you could set system variables such as *\$Post*  or \$PrePrint to
Rationalize (or Rationalize[#, 0]&).

In:= 1 - 1/2

Out= 1/2

In:= 2*314/100

Out= 157/25

In:= \$Post = Rationalize;

In:= 1 - .5

Out= 1/2

In:= 2*3.14

Out= 157/25

In:= \$Post =.;

Regards,
- Jean-Marc


http://reference.wolfram.com/mathematica/tutorial/ArbitraryPrecisionNumbers.html

 http://reference.wolfram.com/mathematica/ref/\$Post.html

```

• Prev by Date: RE: unwanted Complex result
• Next by Date: Re: Mathematica and F# [OT]
• Previous by thread: Re: How to get result in shape of fraction in Mathematica 4.2
• Next by thread: Re: How to get result in shape of fraction in Mathematica 4.2