help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exact zero


From: Patrick Carle
Subject: Exact zero
Date: Fri, 27 May 2011 11:43:38 -0700

This prints a list of numbers, one of which is exactly zero : 

fprintf('%.1e\n',((3:14)-14/2)*.01);

But when the 3 is changed to a 2 in ie:

fprintf('%.1e\n',((2:14)-14/2)*.01);

The number that used to be exactly zero is now -1.7e-018. Is this a bug? Is there a way to force this to be exactly zero?

Thanks!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]