[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Output precision
From: |
JuanPi |
Subject: |
Output precision |
Date: |
Sun, 15 Apr 2012 12:40:58 +0200 |
Hi,
Could anybody give me a help understanding this?
> x = 987654321.123456789;
x = 9.8765e+08
> output_precision(45); output_max_field_width(50)
> x
x = 987654321.123456835746765136718750000000000000
Why is x not displayed in the way I created? In other words, Where did
the last couple of digits go?
Another results that puzzles me is (using the output precision and
field width as above)
> x = 987654321.123456
x = 987654321.123456001281738281250000000000000000
Thank you very much.
--
JuanPi Carbajal
-----
"The bad economist pursues a small present good, which will be
followed by a great evil to come, while the true economist pursues a
great good to come, at the risk of a small present evil." - Frédéric
Bastiat
-----
http://ailab.ifi.uzh.ch/carbajal/
- Output precision,
JuanPi <=