matlab floating point doubt

Status
Not open for further replies.

achaleus

Member level 5
Joined
Dec 21, 2012
Messages
85
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,288
Location
Bangalore
Visit site
Activity points
1,866
Hello all,
18446744073709551615 - 3 and 18446744073709551615 output in cmd line in matlab giving same output as 1.8447e+019.

my ques is how to see exact value as 18446744073709551612
 

Hi Achaelus,

you can change the format of the display in File - Preferences - Command Window - Text display (Numeric format, Numerid display) .
You can use also the "format" command. Type "doc format" or "help format" in the command window for an explanation.

Nevertheless, the accuracy of the representation is insufficient for distinguish 18446744073709551615 from 18446744073709551612.
For example, if you type the command line

>> 18446744073709551615 - 18446744073709551612

you get as result

ans = 0

See help for the "eps" function ("doc eps" command).

Regards

Z
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…