From help-octave-request at che dot utexas dot edu Tue Jul 5 14:30:49 1994 Subject: float->double conversion problem? From: andrew at watsci dot uwaterloo dot ca (Andrew D. Fernandes) To: help-octave at che dot utexas dot edu Date: Tue, 5 Jul 94 15:30:42 -0400 Perhaps someone can help me here: it seems that one is not equal to one... Octave, version 1.0. Copyright (C) 1992, 1993, 1994 John W. Eaton. This is free software with ABSOLUTELY NO WARRANTY. For details, type `warranty'. octave:1> format long e octave:2> 1 ans = 1.00000047683363e+00 octave:3> 1/1 ans = 1.00000047683363e+00 octave:4> quit So, what exactly does this mean? All attempts at setting a variable to exactly 1.0 have failed... is this a bug in the printing subroutines, or is a conversion between a float and a double going on somewhere that twiddles with the low order bits on the floating point number? -Andrew. (andrew at watsci dot uwaterloo dot ca)