[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
float->double conversion problem?
From: |
Andrew D. Fernandes |
Subject: |
float->double conversion problem? |
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. (address@hidden)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- float->double conversion problem?,
Andrew D. Fernandes <=