Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Help: Howto assume decimal-point numbers are ex...' topicStudent Support Forum > General > "Help: Howto assume decimal-point numbers are ex..."

Help | Reply To Topic
Author Comment/Response
09/04/10 7:44pm

I've been over the Documentation and I read this.

"When you type in an integer like 7, Mathematica assumes that it is exact. If you type in a number like 4.5, with an explicit decimal point, Mathematica assumes that it is accurate only to a fixed number of decimal places."

In other words, it assigns machine precision to the number.

"If you want Mathematica to assume that the argument [0.142] is exactly 142/1000, then you have to say so explicitly."

Is there any way at all to modify this behavior? I would love to be able to type "Sqrt[2.2]" and get "Sqrt[11/5]" for output, or even just "Sqrt[2.2]" for output. As it stands, Mathematica gives me "1.48324". I don't want it to assume that numbers with explicit decimal points have finite precision.

I realize that I can just type out each decimal number as a fraction, but this is a hassle and there should be a way around that.

In fact, it would also be great if FullSimplify and similar functions would take advantage of simple decimal representations. For example, "FullSimplify[617239876987536847/100000000000]" would produce "6172398.76987536847".

URL: ,
Help | Reply To Topic