180
181
flag default_nan_mode;
183
void set_float_rounding_mode(int val STATUS_PARAM);
184
void set_float_exception_flags(int val STATUS_PARAM);
185
184
INLINE void set_float_detect_tininess(int val STATUS_PARAM)
187
186
STATUS(float_detect_tininess) = val;
188
INLINE void set_float_rounding_mode(int val STATUS_PARAM)
190
STATUS(float_rounding_mode) = val;
192
INLINE void set_float_exception_flags(int val STATUS_PARAM)
194
STATUS(float_exception_flags) = val;
196
INLINE void set_floatx80_rounding_precision(int val STATUS_PARAM)
198
STATUS(floatx80_rounding_precision) = val;
189
200
INLINE void set_flush_to_zero(flag val STATUS_PARAM)
191
202
STATUS(flush_to_zero) = val;
199
210
STATUS(default_nan_mode) = val;
212
INLINE int get_float_detect_tininess(float_status *status)
214
return STATUS(float_detect_tininess);
216
INLINE int get_float_rounding_mode(float_status *status)
218
return STATUS(float_rounding_mode);
201
220
INLINE int get_float_exception_flags(float_status *status)
203
222
return STATUS(float_exception_flags);
205
void set_floatx80_rounding_precision(int val STATUS_PARAM);
224
INLINE int get_floatx80_rounding_precision(float_status *status)
226
return STATUS(floatx80_rounding_precision);
228
INLINE flag get_flush_to_zero(float_status *status)
230
return STATUS(flush_to_zero);
232
INLINE flag get_flush_inputs_to_zero(float_status *status)
234
return STATUS(flush_inputs_to_zero);
236
INLINE flag get_default_nan_mode(float_status *status)
238
return STATUS(default_nan_mode);
207
241
/*----------------------------------------------------------------------------
208
242
| Routine to raise any or all of the software IEC/IEEE floating-point
225
259
/*----------------------------------------------------------------------------
226
260
| Software IEC/IEEE integer-to-floating-point conversion routines.
227
261
*----------------------------------------------------------------------------*/
228
float32 int32_to_float32( int32 STATUS_PARAM );
229
float64 int32_to_float64( int32 STATUS_PARAM );
230
float32 uint32_to_float32( uint32 STATUS_PARAM );
231
float64 uint32_to_float64( uint32 STATUS_PARAM );
232
floatx80 int32_to_floatx80( int32 STATUS_PARAM );
233
float128 int32_to_float128( int32 STATUS_PARAM );
234
float32 int64_to_float32( int64 STATUS_PARAM );
235
float32 uint64_to_float32( uint64 STATUS_PARAM );
236
float64 int64_to_float64( int64 STATUS_PARAM );
237
float64 uint64_to_float64( uint64 STATUS_PARAM );
238
floatx80 int64_to_floatx80( int64 STATUS_PARAM );
239
float128 int64_to_float128( int64 STATUS_PARAM );
240
float128 uint64_to_float128( uint64 STATUS_PARAM );
262
float32 int32_to_float32(int32_t STATUS_PARAM);
263
float64 int32_to_float64(int32_t STATUS_PARAM);
264
float32 uint32_to_float32(uint32_t STATUS_PARAM);
265
float64 uint32_to_float64(uint32_t STATUS_PARAM);
266
floatx80 int32_to_floatx80(int32_t STATUS_PARAM);
267
float128 int32_to_float128(int32_t STATUS_PARAM);
268
float32 int64_to_float32(int64_t STATUS_PARAM);
269
float32 uint64_to_float32(uint64_t STATUS_PARAM);
270
float64 int64_to_float64(int64_t STATUS_PARAM);
271
float64 uint64_to_float64(uint64_t STATUS_PARAM);
272
floatx80 int64_to_floatx80(int64_t STATUS_PARAM);
273
float128 int64_to_float128(int64_t STATUS_PARAM);
274
float128 uint64_to_float128(uint64_t STATUS_PARAM);
276
/* We provide the int16 versions for symmetry of API with float-to-int */
277
INLINE float32 int16_to_float32(int16_t v STATUS_PARAM)
279
return int32_to_float32(v STATUS_VAR);
282
INLINE float32 uint16_to_float32(uint16_t v STATUS_PARAM)
284
return uint32_to_float32(v STATUS_VAR);
287
INLINE float64 int16_to_float64(int16_t v STATUS_PARAM)
289
return int32_to_float64(v STATUS_VAR);
292
INLINE float64 uint16_to_float64(uint16_t v STATUS_PARAM)
294
return uint32_to_float64(v STATUS_VAR);
242
297
/*----------------------------------------------------------------------------
243
298
| Software half-precision conversion routines.
244
299
*----------------------------------------------------------------------------*/
245
300
float16 float32_to_float16( float32, flag STATUS_PARAM );
246
301
float32 float16_to_float32( float16, flag STATUS_PARAM );
302
float16 float64_to_float16(float64 a, flag ieee STATUS_PARAM);
303
float64 float16_to_float64(float16 a, flag ieee STATUS_PARAM);
248
305
/*----------------------------------------------------------------------------
249
306
| Software half-precision operations.
265
322
/*----------------------------------------------------------------------------
266
323
| Software IEC/IEEE single-precision conversion routines.
267
324
*----------------------------------------------------------------------------*/
325
int_fast16_t float32_to_int16(float32 STATUS_PARAM);
326
uint_fast16_t float32_to_uint16(float32 STATUS_PARAM);
268
327
int_fast16_t float32_to_int16_round_to_zero(float32 STATUS_PARAM);
269
328
uint_fast16_t float32_to_uint16_round_to_zero(float32 STATUS_PARAM);
270
329
int32 float32_to_int32( float32 STATUS_PARAM );
272
331
uint32 float32_to_uint32( float32 STATUS_PARAM );
273
332
uint32 float32_to_uint32_round_to_zero( float32 STATUS_PARAM );
274
333
int64 float32_to_int64( float32 STATUS_PARAM );
334
uint64 float32_to_uint64(float32 STATUS_PARAM);
275
335
int64 float32_to_int64_round_to_zero( float32 STATUS_PARAM );
276
336
float64 float32_to_float64( float32 STATUS_PARAM );
277
337
floatx80 float32_to_floatx80( float32 STATUS_PARAM );
371
431
/*----------------------------------------------------------------------------
372
432
| Software IEC/IEEE double-precision conversion routines.
373
433
*----------------------------------------------------------------------------*/
434
int_fast16_t float64_to_int16(float64 STATUS_PARAM);
435
uint_fast16_t float64_to_uint16(float64 STATUS_PARAM);
374
436
int_fast16_t float64_to_int16_round_to_zero(float64 STATUS_PARAM);
375
437
uint_fast16_t float64_to_uint16_round_to_zero(float64 STATUS_PARAM);
376
438
int32 float64_to_int32( float64 STATUS_PARAM );