[11829] in Athena Bugs

home help back first fref pref prev next nref lref last post

sun4 7.6R: matlab

daemon@ATHENA.MIT.EDU (lunatp@MIT.EDU)
Thu Mar 10 17:28:08 1994

From: lunatp@MIT.EDU
To: bugs@MIT.EDU
Date: Thu, 10 Mar 94 17:28:03 EST

System name:		w20-575-14
Type and version:	SPARC/Classic 7.6R
Display type:		cgthree

What were you trying to do?
	use the "fix" command, which should round to the nearest
	integer towards 0

What's wrong:
	it rounded the integer 15 to 15 (correctly), but rounded
	15 with non-zeros digits in the 15+th places (the number was
	like 15.0000...013427462etc.) to _14_

What should have happened:
	it should have rounded that number to 15

Please describe any relevant documentation references:
	just the definition in the matlab manual defining that function


it wasn't on this machine - i have had the same problem on many machines
running 386 matlab.  The "floor" function, which rounds toward -infinity,
rounded that number to 14 as well.

home help back first fref pref prev next nref lref last post