[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help with format long
From: |
Rik |
Subject: |
Help with format long |
Date: |
Fri, 16 Feb 2018 06:41:00 -0800 |
Could someone try the following code in Matlab? The documentation says
they keep 15 digits after the decimal point for the long format, but
frankly that would be misleading to the programmer. IEEE-854 has 15-17
significant figures when represented in base 10, and there is no reason to
attempt to show more precision if it does not actually exists, as would be
the case if some of the significant digits occur before the decimal point.
Code:
format long
x = pi;
y = [x; x*10; x*100; x*1000]
single (y)
Thanks,
Rik
- Help with format long,
Rik <=