[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45687] fread does not support ARCH 'ieee-le'
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #45687] fread does not support ARCH 'ieee-le' for double on 64bits PC |
Date: |
Wed, 05 Aug 2015 17:25:38 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1) |
Follow-up Comment #4, bug #45687 (project octave):
This works for me as well on GNU/Linux 64-bit and Windows XP 32-bit. Someone
else with access to a Windows 64-bit installation will have to try and verify
this.
The code in question is in liboctave/util/data-conv.cc and is shown below.
void
do_double_format_conversion (void *data, octave_idx_type len,
oct_mach_info::float_format from_fmt,
oct_mach_info::float_format to_fmt)
{
switch (to_fmt)
{
case oct_mach_info::flt_fmt_ieee_little_endian:
switch (from_fmt)
{
case oct_mach_info::flt_fmt_ieee_little_endian:
break;
case oct_mach_info::flt_fmt_ieee_big_endian:
IEEE_big_double_to_IEEE_little_double (data, len);
break;
default:
gripe_unrecognized_float_fmt ();
break;
}
break;
case oct_mach_info::flt_fmt_ieee_big_endian:
switch (from_fmt)
{
case oct_mach_info::flt_fmt_ieee_little_endian:
IEEE_little_double_to_IEEE_big_double (data, len);
break;
case oct_mach_info::flt_fmt_ieee_big_endian:
break;
default:
gripe_unrecognized_float_fmt ();
break;
}
break;
default:
(*current_liboctave_error_handler)
("impossible state reached in file '%s' at line %d",
__FILE__, __LINE__);
break;
}
}
The only way it can get to the default branch of the case statement is if the
conversion format is not ieee-le or ieee-be. The fact that it gets there
suggests that something is wrong with the initial determination of the
machine's floating point format. That determination occurs in
liboctave/system/mach-info.cc.
Could the original reporter try the following at an Octave prompt?
native_float_format ()
On my Linux Intel machine this returns "ieee-le" as it should. I suspect that
this will return "unknown" for you.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45687>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45687] fread does not support ARCH 'ieee-le' for double on 64bits PC, Emmanuel Goua de Baix, 2015/08/04
- [Octave-bug-tracker] [bug #45687] fread does not support ARCH 'ieee-le' for double on 64bits PC, Emmanuel Goua de Baix, 2015/08/04
- [Octave-bug-tracker] [bug #45687] fread does not support ARCH 'ieee-le' for double on 64bits PC, Emmanuel Goua de Baix, 2015/08/04
- [Octave-bug-tracker] [bug #45687] fread does not support ARCH 'ieee-le' for double on 64bits PC, Mike Miller, 2015/08/04
- [Octave-bug-tracker] [bug #45687] fread does not support ARCH 'ieee-le' for double on 64bits PC,
Rik <=
- [Octave-bug-tracker] [bug #45687] fread does not support ARCH 'ieee-le' for double on 64bits PC, Emmanuel Goua de Baix, 2015/08/06
- [Octave-bug-tracker] [bug #45687] fread does not allow different ARCH when file fopen'd with ARCH, Mike Miller, 2015/08/07
- [Octave-bug-tracker] [bug #45687] fread does not allow different ARCH when file fopen'd with ARCH, Rik, 2015/08/09
- [Octave-bug-tracker] [bug #45687] fread does not allow different ARCH when file fopen'd with ARCH, Emmanuel Goua de Baix, 2015/08/11
- [Octave-bug-tracker] [bug #45687] fread does not allow different ARCH when file fopen'd with ARCH, Rik, 2015/08/11