Browse Source

Fix hack from 2008-01-20 that broke on ARM.

master
Bruno Haible 17 years ago
parent
commit
f3f282f3c6
  1. 8
      ChangeLog
  2. 9
      src/float/dfloat/conv/cl_DF_from_double.cc
  3. 9
      src/float/ffloat/conv/cl_FF_from_float.cc

8
ChangeLog

@ -1,3 +1,11 @@
2008-03-31 Bruno Haible <bruno@clisp.org>
Fix hack from 2008-01-20 that broke on ARM.
* src/float/ffloat/conv/cl_FF_from_float.cc (FAST_FLOAT): Remove.
(cl_float_to_FF_pointer): Use anonymous union for conversion.
* src/float/dfloat/conv/cl_DF_from_double.cc (FAST_DOUBLE): Remove.
(cl_double_to_DF_pointer): Use anonymous union for conversion.
2008-03-24 Richard B. Kreckel <kreckel@ginac.de>
* Version 1.2.1 released.

9
src/float/dfloat/conv/cl_DF_from_double.cc

@ -1,8 +1,5 @@
// cl_double_to_DF_pointer().
// Ensure that union dfloatjanus has a 'double' alternative.
#define FAST_DOUBLE
// General includes.
#include "cl_sysdep.h"
@ -16,9 +13,9 @@ namespace cln {
cl_heap_dfloat* cl_double_to_DF_pointer (const double x)
{
var union dfloatjanus val_;
val_.machine_double = x;
var dfloat val = val_.eksplicit;
var union { dfloat eksplicit; double machine_double; } u;
u.machine_double = x;
var dfloat val = u.eksplicit;
#if (cl_word_size==64)
var uintL exp = (val >> DF_mant_len) & (bit(DF_exp_len)-1); // e
if (exp == 0) // e=0 ?

9
src/float/ffloat/conv/cl_FF_from_float.cc

@ -1,8 +1,5 @@
// cl_float_to_FF_pointer().
// Ensure that union ffloatjanus has a 'float' alternative.
#define FAST_FLOAT
// General includes.
#include "cl_sysdep.h"
@ -15,9 +12,9 @@ namespace cln {
cl_private_thing cl_float_to_FF_pointer (const float x)
{
var union ffloatjanus val_;
val_.machine_float = x;
var ffloat val = val_.eksplicit;
var union { ffloat eksplicit; float machine_float; } u;
u.machine_float = x;
var ffloat val = u.eksplicit;
var uintL exp = (val >> FF_mant_len) & (bit(FF_exp_len)-1); // e
if (exp == 0) // e=0 ?
// vorzeichenbehaftete 0.0 oder subnormale Zahl

Loading…
Cancel
Save