1 /* Copyright (C) 2007-2018 Free Software Foundation, Inc.
3 This file is part of GCC.
5 GCC is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 3, or (at your option) any later
10 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 Under Section 7 of GPL version 3, you are granted additional
16 permissions described in the GCC Runtime Library Exception, version
17 3.1, as published by the Free Software Foundation.
19 You should have received a copy of the GNU General Public License and
20 a copy of the GCC Runtime Library Exception along with this program;
21 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
22 <http://www.gnu.org/licenses/>. */
24 #ifndef _BID_FUNCTIONS_H
25 #define _BID_FUNCTIONS_H
28 // When we are built as the part of the gcc runtime library, libgcc,
29 // we will use gcc types defined in bid_gcc_intrinsics.h.
30 #include "bid_gcc_intrinsics.h"
32 #define ALIGN(n) __attribute__ ((aligned(n)))
35 typedef unsigned char UINT8
;
36 typedef unsigned UINT32
;
37 typedef signed SINT32
;
40 #define __int64 long long
43 #if __GNUC__ || defined LINUX || defined SUNOS
44 typedef unsigned long long UINT64
;
45 typedef signed long long SINT64
;
47 typedef unsigned __int64 UINT64
;
48 typedef signed __int64 SINT64
;
52 #if defined _M_IX86 && !defined __INTEL_COMPILER // Win IA-32, MS compiler
55 #define ALIGN(n) __declspec(align(n))
58 #define ALIGN(n) __attribute__ ((aligned(n)))
61 // bid_gcc_intrinsics.h will also define this.
70 #if !defined _MSC_VER || defined __INTEL_COMPILER
71 #define __ENABLE_BINARY80__ 1
75 #define BINARY80 long double
76 #define BINARY128 UINT128
79 #define BINARY80 __float80
80 #define BINARY128 __float128
92 typedef unsigned int FPSC
; // floating-point status and control
95 #define BID128_MAXDIGITS 34
96 #define BID64_MAXDIGITS 16
97 #define BID32_MAXDIGITS 7
100 #define ROUNDING_TO_NEAREST 0x00000
101 #define ROUNDING_DOWN 0x00001
102 #define ROUNDING_UP 0x00002
103 #define ROUNDING_TO_ZERO 0x00003
104 #define ROUNDING_TIES_AWAY 0x00004
106 #define RMODE_MASK (ROUNDING_TO_NEAREST | ROUNDING_DOWN | ROUNDING_UP | ROUNDING_TO_ZERO | ROUNDING_TIES_AWAY)
109 #define FLAG_MASK 0x0000003f
110 #define BID_IEEE_FLAGS 0x0000003d
111 #define EXACT_STATUS 0x00000000
112 #define INEXACT_EXCEPTION 0x00000020
113 #define UNDERFLOW_EXCEPTION 0x00000010
114 #define OVERFLOW_EXCEPTION 0x00000008
115 #define ZERO_DIVIDE_EXCEPTION 0x00000004
116 #define DENORMAL_EXCEPTION 0x00000002
117 #define INVALID_EXCEPTION 0x00000001
119 #define MODE_MASK 0x00001f80
120 #define INEXACT_MODE 0x00001000
121 #define UNDERFLOW_MODE 0x00000800
122 #define OVERFLOW_MODE 0x00000400
123 #define ZERO_DIVIDE_MODE 0x00000200
124 #define DENORMAL_MODE 0x00000100
125 #define INVALID_MODE 0x00000080
127 #if defined LINUX || defined __GLIBC__ || defined SUNOS
128 #define LX16 "%016llx"
131 #define LD16 "%016lld"
134 #define LUD16 "%016llu"
138 #define FMT_LLX16 "%016llx"
139 #define FMT_LLX "%llx"
140 #define FMT_LLU4 "%4llu"
141 #define FMT_LLD16 "%016lld"
142 #define FMT_LLD "%lld"
143 #define FMT_LLU "%llu"
144 #define FMT_LLU16 "%016llu"
145 #define FMT_X8 "%08x"
146 #define FMT_X4 "%04x"
148 #define LX16 "%016I64x"
150 #define LD16 "%016I64d"
154 #define LUD16 "%016I64u"
158 #define FMT_LLX16 "%016I64x"
159 #define FMT_LLX "%I64x"
160 #define FMT_LLD16 "%016I64d"
161 #define FMT_LLU4 "%4I64u"
162 #define FMT_LLD "%I64d"
163 #define FMT_LLU "%I64u"
164 #define FMT_LLU16 "%016I64u"
165 #define FMT_X8 "%08x"
166 #define FMT_X4 "%04x"
169 #define decNumberIsSNaN(dn) (((dn)->bits&(DECSNAN))!=0)
170 int __signbitf (float);
171 int __signbit (double);
173 #define __IMFC99MACRO_( __x__, __func__ ) \
174 (( sizeof( __x__ ) > sizeof( float )) \
175 ? __func__( (double)(__x__) ) \
176 : __func__##f( (float)(__x__) ))
178 #define signbit( __x__ ) __IMFC99MACRO_( __x__, __signbit )
180 #if !defined(__INTEL_COMPILER)
184 #define isinf( __x__ ) __IMFC99MACRO_( __x__, __isinf )
185 #define isnan( __x__ ) __IMFC99MACRO_( __x__, __isnan )
187 int __isnanf (float);
188 int __isnan (double);
190 int __isinff (float);
191 int __isinf (double);
196 // typedef unsigned int _IDEC_round;
197 extern _IDEC_round _IDEC_gblround
; // initialized to ROUNDING_TO_NEAREST
199 /* exception flags */
200 // typedef unsigned int _IDEC_flags; // could be a struct with diagnostic info
201 extern _IDEC_flags _IDEC_gblflags
; // initialized to EXACT_STATUS
203 /* exception masks */
204 typedef unsigned int _IDEC_exceptionmasks
;
205 extern _IDEC_exceptionmasks _IDEC_gblexceptionmasks
; // initialized to MODE_MASK
207 #if DECIMAL_ALTERNATE_EXCEPTION_HANDLING
209 /* exception information */
212 unsigned int inexact_result
:1;
213 unsigned int underflow
:1;
214 unsigned int overflow
:1;
215 unsigned int zero_divide
:1;
216 unsigned int invalid_operation
:1;
217 } fpieee_exception_flags_t
;
221 _fp_round_minus_infinity
,
222 _fp_round_plus_infinity
,
225 } fpieee_rounding_mode_t
;
234 } _fpieee_precision_t
;
237 _fp_code_unspecified
,
242 _fp_code_square_root
,
245 _fp_code_convert_to_integer_neareven
,
246 _fp_code_convert_to_integer_down
,
247 _fp_code_convert_to_integer_up
,
248 _fp_code_convert_to_integer_truncate
,
249 _fp_code_convert_to_integer_nearaway
,
255 _fp_code_round_to_integral
,
267 } fp_operation_code_t
;
273 _fp_compare_unordered
274 } fpieee_compare_result_t
;
283 _fp_format_dec_fp128
,
284 _fp_format_i8
, /* 8-bit integer */
285 _fp_format_i16
, /* 16-bit integer */
286 _fp_format_i32
, /* 32-bit integer */
287 _fp_format_i64
, /* 64-bit integer */
288 _fp_format_u8
, /* 8-bit unsigned integer */
289 _fp_format_u16
, /* 16-bit unsigned integer */
290 _fp_format_u32
, /* 32-bit unsigned integer */
291 _fp_format_u64
, /* 64-bit unsigned integer */
292 _fp_format_compare
, /* compare value format */
293 _fp_format_decimal_char
, /* decimal character */
294 _fp_format_string
/* string */
309 _float80_t fp80_value
;
310 _float128_t fp128_value
;
311 UINT32 decfp32_value
;
312 UINT64 decfp64_value
;
313 UINT128 decfp128_value
;
318 unsigned char u8_value
;
319 unsigned short u16_value
;
320 unsigned int u32_value
;
321 unsigned long u64_value
;
322 fpieee_compare_result_t compare_value
;
323 unsigned char s
[256];
325 unsigned int operand_valid
:1;
326 fpieee_format_t format
:5;
330 unsigned int rounding_mode
:3;
331 unsigned int precision
:3;
332 unsigned int operation
:26;
333 fpieee_exception_flags_t cause
;
334 fpieee_exception_flags_t enable
;
335 fpieee_exception_flags_t status
;
336 fpieee_value_t operand1
;
337 fpieee_value_t operand2
;
338 fpieee_value_t operand3
;
339 fpieee_value_t result
;
340 } _IDEC_excepthandling
;
341 extern _IDEC_excepthandling _IDEC_glbexcepthandling
;
345 #if DECIMAL_CALL_BY_REFERENCE
347 extern void bid_to_dpd32 (UINT32
* pres
, UINT32
* px
);
348 extern void bid_to_dpd64 (UINT64
* pres
, UINT64
* px
);
349 extern void bid_to_dpd128 (UINT128
* pres
, UINT128
* px
);
350 extern void dpd_to_bid32 (UINT32
* pres
, UINT32
* px
);
351 extern void dpd_to_bid64 (UINT64
* pres
, UINT64
* px
);
352 extern void dpd_to_bid128 (UINT128
* pres
, UINT128
* px
);
354 extern void bid128dd_add (UINT128
* pres
, UINT64
* px
,
356 _RND_MODE_PARAM _EXC_FLAGS_PARAM
357 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
358 extern void bid128dq_add (UINT128
* pres
, UINT64
* px
,
360 _RND_MODE_PARAM _EXC_FLAGS_PARAM
361 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
362 extern void bid128qd_add (UINT128
* pres
, UINT128
* px
,
364 _RND_MODE_PARAM _EXC_FLAGS_PARAM
365 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
366 extern void bid128_add (UINT128
* pres
, UINT128
* px
,
368 py _RND_MODE_PARAM _EXC_FLAGS_PARAM
369 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
370 extern void bid128dd_sub (UINT128
* pres
, UINT64
* px
,
372 _RND_MODE_PARAM _EXC_FLAGS_PARAM
373 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
374 extern void bid128dq_sub (UINT128
* pres
, UINT64
* px
,
376 _RND_MODE_PARAM _EXC_FLAGS_PARAM
377 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
378 extern void bid128qd_sub (UINT128
* pres
, UINT128
* px
,
380 _RND_MODE_PARAM _EXC_FLAGS_PARAM
381 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
382 extern void bid128_sub (UINT128
* pres
, UINT128
* px
,
384 py _RND_MODE_PARAM _EXC_FLAGS_PARAM
385 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
386 extern void bid128dd_mul (UINT128
* pres
, UINT64
* px
,
388 _RND_MODE_PARAM _EXC_FLAGS_PARAM
389 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
390 extern void bid128dq_mul (UINT128
* pres
, UINT64
* px
,
392 _RND_MODE_PARAM _EXC_FLAGS_PARAM
393 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
394 extern void bid128qd_mul (UINT128
* pres
, UINT128
* px
,
396 _RND_MODE_PARAM _EXC_FLAGS_PARAM
397 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
398 extern void bid128_mul (UINT128
* pres
, UINT128
* px
,
400 _RND_MODE_PARAM _EXC_FLAGS_PARAM
401 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
402 extern void bid128_div (UINT128
* pres
, UINT128
* px
,
404 py _RND_MODE_PARAM _EXC_FLAGS_PARAM
405 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
406 extern void bid128dd_div (UINT128
* pres
, UINT64
* px
,
408 _RND_MODE_PARAM _EXC_FLAGS_PARAM
409 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
410 extern void bid128dq_div (UINT128
* pres
, UINT64
* px
,
412 _RND_MODE_PARAM _EXC_FLAGS_PARAM
413 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
414 extern void bid128qd_div (UINT128
* pres
, UINT128
* px
,
416 _RND_MODE_PARAM _EXC_FLAGS_PARAM
417 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
418 extern void bid128_fma (UINT128
* pres
, UINT128
* px
,
419 UINT128
* py
, UINT128
* pz
420 _RND_MODE_PARAM _EXC_FLAGS_PARAM
421 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
422 extern void bid128ddd_fma (UINT128
* pres
, UINT64
* px
,
423 UINT64
* py
, UINT64
* pz
424 _RND_MODE_PARAM _EXC_FLAGS_PARAM
425 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
426 extern void bid128ddq_fma (UINT128
* pres
, UINT64
* px
,
427 UINT64
* py
, UINT128
* pz
428 _RND_MODE_PARAM _EXC_FLAGS_PARAM
429 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
430 extern void bid128dqd_fma (UINT128
* pres
, UINT64
* px
,
431 UINT128
* py
, UINT64
* pz
432 _RND_MODE_PARAM _EXC_FLAGS_PARAM
433 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
434 extern void bid128dqq_fma (UINT128
* pres
, UINT64
* px
,
435 UINT128
* py
, UINT128
* pz
436 _RND_MODE_PARAM _EXC_FLAGS_PARAM
437 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
438 extern void bid128qdd_fma (UINT128
* pres
, UINT128
* px
,
439 UINT64
* py
, UINT64
* pz
440 _RND_MODE_PARAM _EXC_FLAGS_PARAM
441 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
442 extern void bid128qdq_fma (UINT128
* pres
, UINT128
* px
,
443 UINT64
* py
, UINT128
* pz
444 _RND_MODE_PARAM _EXC_FLAGS_PARAM
445 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
446 extern void bid128qqd_fma (UINT128
* pres
, UINT128
* px
,
447 UINT128
* py
, UINT64
* pz
448 _RND_MODE_PARAM _EXC_FLAGS_PARAM
449 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
450 // Note: bid128qqq_fma is represented by bid128_fma
451 // Note: bid64ddd_fma is represented by bid64_fma
452 extern void bid64ddq_fma (UINT64
* pres
, UINT64
* px
,
453 UINT64
* py
, UINT128
* pz
454 _RND_MODE_PARAM _EXC_FLAGS_PARAM
455 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
456 extern void bid64dqd_fma (UINT64
* pres
, UINT64
* px
,
457 UINT128
* py
, UINT64
* pz
458 _RND_MODE_PARAM _EXC_FLAGS_PARAM
459 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
460 extern void bid64dqq_fma (UINT64
* pres
, UINT64
* px
,
461 UINT128
* py
, UINT128
* pz
462 _RND_MODE_PARAM _EXC_FLAGS_PARAM
463 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
464 extern void bid64qdd_fma (UINT64
* pres
, UINT128
* px
,
465 UINT64
* py
, UINT64
* pz
466 _RND_MODE_PARAM _EXC_FLAGS_PARAM
467 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
468 extern void bid64qdq_fma (UINT64
* pres
, UINT128
* px
,
469 UINT64
* py
, UINT128
* pz
470 _RND_MODE_PARAM _EXC_FLAGS_PARAM
471 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
472 extern void bid64qqd_fma (UINT64
* pres
, UINT128
* px
,
473 UINT128
* py
, UINT64
* pz
474 _RND_MODE_PARAM _EXC_FLAGS_PARAM
475 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
476 extern void bid64qqq_fma (UINT64
* pres
, UINT128
* px
,
477 UINT128
* py
, UINT128
* pz
478 _RND_MODE_PARAM _EXC_FLAGS_PARAM
479 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
481 extern void bid128_sqrt (UINT128
* pres
,
483 px _RND_MODE_PARAM _EXC_FLAGS_PARAM
484 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
485 extern void bid128d_sqrt (UINT128
* pres
, UINT64
* px
486 _RND_MODE_PARAM _EXC_FLAGS_PARAM
487 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
489 extern void bid64_add (UINT64
* pres
, UINT64
* px
,
491 py _RND_MODE_PARAM _EXC_FLAGS_PARAM
492 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
493 extern void bid64dq_add (UINT64
* pres
, UINT64
* px
,
495 _RND_MODE_PARAM _EXC_FLAGS_PARAM
496 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
497 extern void bid64qd_add (UINT64
* pres
, UINT128
* px
,
499 _RND_MODE_PARAM _EXC_FLAGS_PARAM
500 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
501 extern void bid64qq_add (UINT64
* pres
, UINT128
* px
,
503 _RND_MODE_PARAM _EXC_FLAGS_PARAM
504 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
505 extern void bid64_sub (UINT64
* pres
, UINT64
* px
,
507 py _RND_MODE_PARAM _EXC_FLAGS_PARAM
508 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
509 extern void bid64dq_sub (UINT64
* pres
, UINT64
* px
,
511 _RND_MODE_PARAM _EXC_FLAGS_PARAM
512 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
513 extern void bid64qd_sub (UINT64
* pres
, UINT128
* px
,
515 _RND_MODE_PARAM _EXC_FLAGS_PARAM
516 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
517 extern void bid64qq_sub (UINT64
* pres
, UINT128
* px
,
519 _RND_MODE_PARAM _EXC_FLAGS_PARAM
520 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
521 extern void bid64_mul (UINT64
* pres
, UINT64
* px
,
523 _RND_MODE_PARAM _EXC_FLAGS_PARAM
524 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
525 extern void bid64dq_mul (UINT64
* pres
, UINT64
* px
,
527 _RND_MODE_PARAM _EXC_FLAGS_PARAM
528 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
529 extern void bid64qd_mul (UINT64
* pres
, UINT128
* px
,
531 _RND_MODE_PARAM _EXC_FLAGS_PARAM
532 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
533 extern void bid64qq_mul (UINT64
* pres
, UINT128
* px
,
535 _RND_MODE_PARAM _EXC_FLAGS_PARAM
536 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
537 extern void bid64_div (UINT64
* pres
, UINT64
* px
,
539 py _RND_MODE_PARAM _EXC_FLAGS_PARAM
540 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
541 extern void bid64dq_div (UINT64
* pres
, UINT64
* px
,
543 _RND_MODE_PARAM _EXC_FLAGS_PARAM
544 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
545 extern void bid64qd_div (UINT64
* pres
, UINT128
* px
,
547 _RND_MODE_PARAM _EXC_FLAGS_PARAM
548 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
549 extern void bid64qq_div (UINT64
* pres
, UINT128
* px
,
551 _RND_MODE_PARAM _EXC_FLAGS_PARAM
552 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
553 extern void bid64_fma (UINT64
* pres
, UINT64
* px
,
556 pz _RND_MODE_PARAM _EXC_FLAGS_PARAM
557 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
558 extern void bid64_sqrt (UINT64
* pres
,
560 px _RND_MODE_PARAM _EXC_FLAGS_PARAM
561 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
562 extern void bid64q_sqrt (UINT64
* pres
, UINT128
* px
563 _RND_MODE_PARAM _EXC_FLAGS_PARAM
564 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
566 extern void bid128_to_int8_rnint (char *pres
,
571 extern void bid128_to_int8_xrnint (char *pres
,
576 extern void bid128_to_int8_rninta (char *pres
,
581 extern void bid128_to_int8_xrninta (char *pres
,
586 extern void bid128_to_int8_int (char *pres
,
589 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
590 extern void bid128_to_int8_xint (char *pres
,
593 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
594 extern void bid128_to_int8_floor (char *pres
,
599 extern void bid128_to_int8_xfloor (char *pres
,
604 extern void bid128_to_int8_ceil (char *pres
,
607 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
608 extern void bid128_to_int8_xceil (char *pres
,
613 extern void bid128_to_int16_rnint (short *pres
,
618 extern void bid128_to_int16_xrnint (short *pres
,
623 extern void bid128_to_int16_rninta (short *pres
,
628 extern void bid128_to_int16_xrninta (short *pres
,
633 extern void bid128_to_int16_int (short *pres
,
636 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
637 extern void bid128_to_int16_xint (short *pres
,
642 extern void bid128_to_int16_floor (short *pres
,
647 extern void bid128_to_int16_xfloor (short *pres
,
652 extern void bid128_to_int16_ceil (short *pres
,
657 extern void bid128_to_int16_xceil (short *pres
,
662 extern void bid128_to_uint8_rnint (unsigned char *pres
,
667 extern void bid128_to_uint8_xrnint (unsigned char *pres
,
672 extern void bid128_to_uint8_rninta (unsigned char *pres
,
677 extern void bid128_to_uint8_xrninta (unsigned char *pres
,
682 extern void bid128_to_uint8_int (unsigned char *pres
,
685 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
686 extern void bid128_to_uint8_xint (unsigned char *pres
,
691 extern void bid128_to_uint8_floor (unsigned char *pres
,
696 extern void bid128_to_uint8_xfloor (unsigned char *pres
,
701 extern void bid128_to_uint8_ceil (unsigned char *pres
,
706 extern void bid128_to_uint8_xceil (unsigned char *pres
,
711 extern void bid128_to_uint16_rnint (unsigned short *pres
,
716 extern void bid128_to_uint16_xrnint (unsigned short *pres
,
721 extern void bid128_to_uint16_rninta (unsigned short *pres
,
726 extern void bid128_to_uint16_xrninta (unsigned short *pres
,
731 extern void bid128_to_uint16_int (unsigned short *pres
,
736 extern void bid128_to_uint16_xint (unsigned short *pres
,
741 extern void bid128_to_uint16_floor (unsigned short *pres
,
746 extern void bid128_to_uint16_xfloor (unsigned short *pres
,
751 extern void bid128_to_uint16_ceil (unsigned short *pres
,
756 extern void bid128_to_uint16_xceil (unsigned short *pres
,
761 extern void bid128_to_int32_rnint (int *pres
,
766 extern void bid128_to_int32_xrnint (int *pres
,
771 extern void bid128_to_int32_rninta (int *pres
,
776 extern void bid128_to_int32_xrninta (int *pres
,
781 extern void bid128_to_int32_int (int *pres
,
784 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
785 extern void bid128_to_int32_xint (int *pres
,
790 extern void bid128_to_int32_floor (int *pres
,
795 extern void bid128_to_int32_xfloor (int *pres
,
800 extern void bid128_to_int32_ceil (int *pres
,
805 extern void bid128_to_int32_xceil (int *pres
,
810 extern void bid128_to_uint32_rnint (unsigned int *pres
,
815 extern void bid128_to_uint32_xrnint (unsigned int *pres
,
820 extern void bid128_to_uint32_rninta (unsigned int *pres
,
825 extern void bid128_to_uint32_xrninta (unsigned int *pres
,
830 extern void bid128_to_uint32_int (unsigned int *pres
,
835 extern void bid128_to_uint32_xint (unsigned int *pres
,
840 extern void bid128_to_uint32_floor (unsigned int *pres
,
845 extern void bid128_to_uint32_xfloor (unsigned int *pres
,
850 extern void bid128_to_uint32_ceil (unsigned int *pres
,
855 extern void bid128_to_uint32_xceil (unsigned int *pres
,
860 extern void bid128_to_int64_rnint (SINT64
* pres
,
865 extern void bid128_to_int64_xrnint (SINT64
* pres
,
870 extern void bid128_to_int64_rninta (SINT64
* pres
,
875 extern void bid128_to_int64_xrninta (SINT64
* pres
,
880 extern void bid128_to_int64_int (SINT64
* pres
,
883 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
884 extern void bid128_to_int64_xint (SINT64
* pres
,
889 extern void bid128_to_int64_floor (SINT64
* pres
,
894 extern void bid128_to_int64_xfloor (SINT64
* pres
,
899 extern void bid128_to_int64_ceil (SINT64
* pres
,
904 extern void bid128_to_int64_xceil (SINT64
* pres
,
909 extern void bid128_to_uint64_rnint (UINT64
* pres
,
914 extern void bid128_to_uint64_xrnint (UINT64
* pres
,
919 extern void bid128_to_uint64_rninta (UINT64
* pres
,
924 extern void bid128_to_uint64_xrninta (UINT64
* pres
,
929 extern void bid128_to_uint64_int (UINT64
* pres
,
934 extern void bid128_to_uint64_xint (UINT64
* pres
,
939 extern void bid128_to_uint64_floor (UINT64
* pres
,
944 extern void bid128_to_uint64_xfloor (UINT64
* pres
,
949 extern void bid128_to_uint64_ceil (UINT64
* pres
,
954 extern void bid128_to_uint64_xceil (UINT64
* pres
,
959 extern void bid64_to_int32_rnint (int *pres
,
964 extern void bid64_to_int32_xrnint (int *pres
,
969 extern void bid64_to_int32_rninta (int *pres
,
974 extern void bid64_to_int32_xrninta (int *pres
,
979 extern void bid64_to_int32_int (int *pres
,
982 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
983 extern void bid64_to_int32_xint (int *pres
,
986 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
987 extern void bid64_to_int32_floor (int *pres
,
992 extern void bid64_to_int32_xfloor (int *pres
,
997 extern void bid64_to_int32_ceil (int *pres
,
1000 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1001 extern void bid64_to_int32_xceil (int *pres
,
1006 extern void bid64_to_int8_rnint (char *pres
,
1009 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1010 extern void bid64_to_int8_xrnint (char *pres
,
1015 extern void bid64_to_int8_rninta (char *pres
,
1020 extern void bid64_to_int8_xrninta (char *pres
,
1025 extern void bid64_to_int8_int (char *pres
,
1027 px _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1029 extern void bid64_to_int8_xint (char *pres
,
1032 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1033 extern void bid64_to_int8_floor (char *pres
,
1036 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1037 extern void bid64_to_int8_xfloor (char *pres
,
1042 extern void bid64_to_int8_ceil (char *pres
,
1045 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1046 extern void bid64_to_int8_xceil (char *pres
,
1049 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1050 extern void bid64_to_int16_rnint (short *pres
,
1055 extern void bid64_to_int16_xrnint (short *pres
,
1060 extern void bid64_to_int16_rninta (short *pres
,
1065 extern void bid64_to_int16_xrninta (short *pres
,
1070 extern void bid64_to_int16_int (short *pres
,
1073 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1074 extern void bid64_to_int16_xint (short *pres
,
1077 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1078 extern void bid64_to_int16_floor (short *pres
,
1083 extern void bid64_to_int16_xfloor (short *pres
,
1088 extern void bid64_to_int16_ceil (short *pres
,
1091 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1092 extern void bid64_to_int16_xceil (short *pres
,
1097 extern void bid64_to_uint8_rnint (unsigned char *pres
,
1102 extern void bid64_to_uint8_xrnint (unsigned char *pres
,
1107 extern void bid64_to_uint8_rninta (unsigned char *pres
,
1112 extern void bid64_to_uint8_xrninta (unsigned char *pres
,
1117 extern void bid64_to_uint8_int (unsigned char *pres
,
1120 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1121 extern void bid64_to_uint8_xint (unsigned char *pres
,
1124 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1125 extern void bid64_to_uint8_floor (unsigned char *pres
,
1130 extern void bid64_to_uint8_xfloor (unsigned char *pres
,
1135 extern void bid64_to_uint8_ceil (unsigned char *pres
,
1138 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1139 extern void bid64_to_uint8_xceil (unsigned char *pres
,
1144 extern void bid64_to_uint16_rnint (unsigned short *pres
,
1149 extern void bid64_to_uint16_xrnint (unsigned short *pres
,
1154 extern void bid64_to_uint16_rninta (unsigned short *pres
,
1159 extern void bid64_to_uint16_xrninta (unsigned short *pres
,
1164 extern void bid64_to_uint16_int (unsigned short *pres
,
1167 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1168 extern void bid64_to_uint16_xint (unsigned short *pres
,
1173 extern void bid64_to_uint16_floor (unsigned short *pres
,
1178 extern void bid64_to_uint16_xfloor (unsigned short *pres
,
1183 extern void bid64_to_uint16_ceil (unsigned short *pres
,
1188 extern void bid64_to_uint16_xceil (unsigned short *pres
,
1193 extern void bid64_to_uint32_rnint (unsigned int *pres
,
1198 extern void bid64_to_uint32_xrnint (unsigned int *pres
,
1203 extern void bid64_to_uint32_rninta (unsigned int *pres
,
1208 extern void bid64_to_uint32_xrninta (unsigned int *pres
,
1213 extern void bid64_to_uint32_int (unsigned int *pres
,
1216 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1217 extern void bid64_to_uint32_xint (unsigned int *pres
,
1222 extern void bid64_to_uint32_floor (unsigned int *pres
,
1227 extern void bid64_to_uint32_xfloor (unsigned int *pres
,
1232 extern void bid64_to_uint32_ceil (unsigned int *pres
,
1237 extern void bid64_to_uint32_xceil (unsigned int *pres
,
1242 extern void bid64_to_int64_rnint (SINT64
* pres
,
1247 extern void bid64_to_int64_xrnint (SINT64
* pres
,
1252 extern void bid64_to_int64_rninta (SINT64
* pres
,
1257 extern void bid64_to_int64_xrninta (SINT64
* pres
,
1262 extern void bid64_to_int64_int (SINT64
* pres
,
1265 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1266 extern void bid64_to_int64_xint (SINT64
* pres
,
1269 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1270 extern void bid64_to_int64_floor (SINT64
* pres
,
1275 extern void bid64_to_int64_xfloor (SINT64
* pres
,
1280 extern void bid64_to_int64_ceil (SINT64
* pres
,
1283 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1284 extern void bid64_to_int64_xceil (SINT64
* pres
,
1289 extern void bid64_to_uint64_rnint (UINT64
* pres
,
1294 extern void bid64_to_uint64_xrnint (UINT64
* pres
,
1299 extern void bid64_to_uint64_rninta (UINT64
* pres
,
1304 extern void bid64_to_uint64_xrninta (UINT64
* pres
,
1309 extern void bid64_to_uint64_int (UINT64
* pres
,
1312 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1313 extern void bid64_to_uint64_xint (UINT64
* pres
,
1318 extern void bid64_to_uint64_floor (UINT64
* pres
,
1323 extern void bid64_to_uint64_xfloor (UINT64
* pres
,
1328 extern void bid64_to_uint64_ceil (UINT64
* pres
,
1333 extern void bid64_to_uint64_xceil (UINT64
* pres
,
1339 extern void bid64_quiet_equal (int *pres
, UINT64
* px
, UINT64
* py
1340 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1342 extern void bid64_quiet_greater (int *pres
, UINT64
* px
,
1345 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1346 extern void bid64_quiet_greater_equal (int *pres
, UINT64
* px
,
1351 extern void bid64_quiet_greater_unordered (int *pres
, UINT64
* px
,
1356 extern void bid64_quiet_less (int *pres
, UINT64
* px
,
1358 py _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1360 extern void bid64_quiet_less_equal (int *pres
, UINT64
* px
,
1365 extern void bid64_quiet_less_unordered (int *pres
, UINT64
* px
,
1370 extern void bid64_quiet_not_equal (int *pres
, UINT64
* px
,
1375 extern void bid64_quiet_not_greater (int *pres
, UINT64
* px
,
1380 extern void bid64_quiet_not_less (int *pres
, UINT64
* px
,
1385 extern void bid64_quiet_ordered (int *pres
, UINT64
* px
,
1388 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1389 extern void bid64_quiet_unordered (int *pres
, UINT64
* px
,
1394 extern void bid64_signaling_greater (int *pres
, UINT64
* px
,
1399 extern void bid64_signaling_greater_equal (int *pres
, UINT64
* px
,
1404 extern void bid64_signaling_greater_unordered (int *pres
,
1410 extern void bid64_signaling_less (int *pres
, UINT64
* px
,
1415 extern void bid64_signaling_less_equal (int *pres
, UINT64
* px
,
1420 extern void bid64_signaling_less_unordered (int *pres
, UINT64
* px
,
1425 extern void bid64_signaling_not_greater (int *pres
, UINT64
* px
,
1430 extern void bid64_signaling_not_less (int *pres
, UINT64
* px
,
1436 extern void bid128_quiet_equal (int *pres
, UINT128
* px
,
1439 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1440 extern void bid128_quiet_greater (int *pres
, UINT128
* px
,
1445 extern void bid128_quiet_greater_equal (int *pres
, UINT128
* px
,
1450 extern void bid128_quiet_greater_unordered (int *pres
,
1456 extern void bid128_quiet_less (int *pres
, UINT128
* px
,
1458 py _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1460 extern void bid128_quiet_less_equal (int *pres
, UINT128
* px
,
1465 extern void bid128_quiet_less_unordered (int *pres
, UINT128
* px
,
1470 extern void bid128_quiet_not_equal (int *pres
, UINT128
* px
,
1475 extern void bid128_quiet_not_greater (int *pres
, UINT128
* px
,
1480 extern void bid128_quiet_not_less (int *pres
, UINT128
* px
,
1485 extern void bid128_quiet_ordered (int *pres
, UINT128
* px
,
1490 extern void bid128_quiet_unordered (int *pres
, UINT128
* px
,
1495 extern void bid128_signaling_greater (int *pres
, UINT128
* px
,
1500 extern void bid128_signaling_greater_equal (int *pres
,
1506 extern void bid128_signaling_greater_unordered (int *pres
,
1512 extern void bid128_signaling_less (int *pres
, UINT128
* px
,
1517 extern void bid128_signaling_less_equal (int *pres
, UINT128
* px
,
1522 extern void bid128_signaling_less_unordered (int *pres
,
1528 extern void bid128_signaling_not_greater (int *pres
, UINT128
* px
,
1533 extern void bid128_signaling_not_less (int *pres
, UINT128
* px
,
1539 extern void bid64_round_integral_exact (UINT64
* pres
, UINT64
* px
1544 extern void bid64_round_integral_nearest_even (UINT64
* pres
,
1549 extern void bid64_round_integral_negative (UINT64
* pres
,
1554 extern void bid64_round_integral_positive (UINT64
* pres
,
1559 extern void bid64_round_integral_zero (UINT64
* pres
,
1564 extern void bid64_round_integral_nearest_away (UINT64
* pres
,
1570 extern void bid128_round_integral_exact (UINT128
* pres
,
1576 extern void bid128_round_integral_nearest_even (UINT128
* pres
,
1581 extern void bid128_round_integral_negative (UINT128
* pres
,
1586 extern void bid128_round_integral_positive (UINT128
* pres
,
1591 extern void bid128_round_integral_zero (UINT128
* pres
,
1596 extern void bid128_round_integral_nearest_away (UINT128
* pres
,
1602 extern void bid64_nextup (UINT64
* pres
, UINT64
* px
1603 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1605 extern void bid64_nextdown (UINT64
* pres
,
1607 px _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1609 extern void bid64_nextafter (UINT64
* pres
, UINT64
* px
,
1611 py _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1614 extern void bid128_nextup (UINT128
* pres
, UINT128
* px
1615 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1617 extern void bid128_nextdown (UINT128
* pres
,
1619 px _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1621 extern void bid128_nextafter (UINT128
* pres
, UINT128
* px
,
1623 py _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1626 extern void bid64_minnum (UINT64
* pres
, UINT64
* px
, UINT64
* py
1628 extern void bid64_minnum_mag (UINT64
* pres
, UINT64
* px
,
1629 UINT64
* py _EXC_FLAGS_PARAM
);
1630 extern void bid64_maxnum (UINT64
* pres
, UINT64
* px
, UINT64
* py
1632 extern void bid64_maxnum_mag (UINT64
* pres
, UINT64
* px
,
1633 UINT64
* py _EXC_FLAGS_PARAM
);
1635 extern void bid128_minnum (UINT128
* pres
, UINT128
* px
,
1636 UINT128
* py _EXC_FLAGS_PARAM
);
1637 extern void bid128_minnum_mag (UINT128
* pres
, UINT128
* px
,
1638 UINT128
* py _EXC_FLAGS_PARAM
);
1639 extern void bid128_maxnum (UINT128
* pres
, UINT128
* px
,
1640 UINT128
* py _EXC_FLAGS_PARAM
);
1641 extern void bid128_maxnum_mag (UINT128
* pres
, UINT128
* px
,
1642 UINT128
* py _EXC_FLAGS_PARAM
);
1644 extern void bid64_from_int32 (UINT64
* pres
, int *px
1645 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1646 extern void bid64_from_uint32 (UINT64
* pres
, unsigned int *px
1647 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1648 extern void bid64_from_int64 (UINT64
* pres
, SINT64
* px
1649 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1650 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1651 extern void bid64_from_uint64 (UINT64
* pres
,
1653 px _RND_MODE_PARAM _EXC_FLAGS_PARAM
1654 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1655 extern void bid128_from_int32 (UINT128
* pres
,
1656 int *px _EXC_MASKS_PARAM
1658 extern void bid128_from_uint32 (UINT128
* pres
,
1659 unsigned int *px _EXC_MASKS_PARAM
1661 extern void bid128_from_int64 (UINT128
* pres
,
1665 extern void bid128_from_uint64 (UINT128
* pres
,
1670 extern void bid64_isSigned (int *pres
, UINT64
* px
1671 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1672 extern void bid64_isNormal (int *pres
, UINT64
* px
1673 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1674 extern void bid64_isSubnormal (int *pres
, UINT64
* px
1675 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1676 extern void bid64_isFinite (int *pres
, UINT64
* px
1677 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1678 extern void bid64_isZero (int *pres
, UINT64
* px
1679 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1680 extern void bid64_isInf (int *pres
, UINT64
* px
1681 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1682 extern void bid64_isSignaling (int *pres
, UINT64
* px
1683 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1684 extern void bid64_isCanonical (int *pres
, UINT64
* px
1685 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1686 extern void bid64_isNaN (int *pres
, UINT64
* px
1687 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1688 extern void bid64_copy (UINT64
* pres
, UINT64
* px
1689 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1690 extern void bid64_negate (UINT64
* pres
, UINT64
* px
1691 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1692 extern void bid64_abs (UINT64
* pres
, UINT64
* px
1693 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1694 extern void bid64_copySign (UINT64
* pres
, UINT64
* px
, UINT64
* py
1695 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1696 extern void bid64_class (int *pres
, UINT64
* px
1697 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1698 extern void bid64_sameQuantum (int *pres
, UINT64
* px
, UINT64
* py
1699 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1700 extern void bid64_totalOrder (int *pres
, UINT64
* px
, UINT64
* py
1701 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1702 extern void bid64_totalOrderMag (int *pres
, UINT64
* px
,
1706 extern void bid64_radix (int *pres
,
1708 px _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1710 extern void bid128_isSigned (int *pres
, UINT128
* px
1711 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1712 extern void bid128_isNormal (int *pres
, UINT128
* px
1713 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1714 extern void bid128_isSubnormal (int *pres
, UINT128
* px
1715 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1716 extern void bid128_isFinite (int *pres
, UINT128
* px
1717 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1718 extern void bid128_isZero (int *pres
, UINT128
* px
1719 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1720 extern void bid128_isInf (int *pres
, UINT128
* px
1721 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1722 extern void bid128_isSignaling (int *pres
, UINT128
* px
1723 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1724 extern void bid128_isCanonical (int *pres
, UINT128
* px
1725 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1726 extern void bid128_isNaN (int *pres
, UINT128
* px
1727 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1728 extern void bid128_copy (UINT128
* pres
, UINT128
* px
1729 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1730 extern void bid128_negate (UINT128
* pres
, UINT128
* px
1731 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1732 extern void bid128_abs (UINT128
* pres
, UINT128
* px
1733 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1734 extern void bid128_copySign (UINT128
* pres
, UINT128
* px
,
1736 py _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1737 extern void bid128_class (int *pres
,
1739 px _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1740 extern void bid128_sameQuantum (int *pres
, UINT128
* px
,
1744 extern void bid128_totalOrder (int *pres
, UINT128
* px
,
1748 extern void bid128_totalOrderMag (int *pres
, UINT128
* px
,
1752 extern void bid128_radix (int *pres
,
1754 px _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1756 extern void bid64_rem (UINT64
* pres
, UINT64
* px
, UINT64
* py
1758 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1759 extern void bid64_logb (int * pres
, UINT64
* px
1760 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1762 extern void bid64_scalb (UINT64
* pres
, UINT64
* px
,
1763 int *pn _RND_MODE_PARAM _EXC_FLAGS_PARAM
1764 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1766 extern void bid128_rem (UINT128
* pres
, UINT128
* px
, UINT128
* py
1768 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1769 extern void bid128_logb (int * pres
, UINT128
* px
1771 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1772 extern void bid128_scalb (UINT128
* pres
, UINT128
* px
,
1773 int *pn _RND_MODE_PARAM _EXC_FLAGS_PARAM
1774 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1776 extern void bid32_to_bid64 (UINT64
* pres
,
1778 px _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1780 extern void bid32_to_bid128 (UINT128
* pres
,
1782 px _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1784 extern void bid64_to_bid128 (UINT128
* pres
,
1786 px _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1788 extern void bid64_to_bid32 (UINT32
* pres
,
1790 px _RND_MODE_PARAM _EXC_FLAGS_PARAM
1791 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1792 extern void bid128_to_bid32 (UINT32
* pres
,
1794 px _RND_MODE_PARAM _EXC_FLAGS_PARAM
1795 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1796 extern void bid128_to_bid64 (UINT64
* pres
,
1798 px _RND_MODE_PARAM _EXC_FLAGS_PARAM
1799 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1801 extern void bid64_from_string (UINT64
* pres
, char *ps
1802 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1803 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1804 extern void bid64_to_string (char *ps
, UINT64
* px
1806 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1807 extern void bid128_from_string (UINT128
* pres
, char *ps
1808 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1809 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1810 extern void bid128_to_string (char *str
, UINT128
* px
1812 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1814 extern void bid64_quantize (UINT64
* pres
, UINT64
* px
,
1816 py _RND_MODE_PARAM _EXC_FLAGS_PARAM
1817 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1819 extern void bid128_quantize (UINT128
* pres
, UINT128
* px
,
1821 py _RND_MODE_PARAM _EXC_FLAGS_PARAM
1822 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1824 extern void bid128_to_binary32 (float *pres
, UINT128
* px
1825 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1826 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1828 extern void bid128_to_binary64 (double *pres
, UINT128
* px
1829 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1830 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1832 extern void bid128_to_binary80 (BINARY80
* pres
, UINT128
* px
1833 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1834 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1836 extern void bid128_to_binary128 (BINARY128
* pres
, UINT128
* px
1837 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1838 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1840 extern void binary128_to_bid32 (UINT32
* pres
, BINARY128
* px
1841 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1842 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1844 extern void binary128_to_bid64 (UINT64
* pres
, BINARY128
* px
1845 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1846 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1848 extern void binary128_to_bid128 (UINT128
* pres
, BINARY128
* px
1849 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1850 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1852 extern void bid64_to_binary32 (float *pres
, UINT64
* px
1853 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1854 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1856 extern void bid64_to_binary64 (double *pres
, UINT64
* px
1857 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1858 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1860 extern void bid64_to_binary80 (BINARY80
* pres
, UINT64
* px
1861 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1862 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1864 extern void bid64_to_binary128 (BINARY128
* pres
, UINT64
* px
1865 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1866 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1868 extern void binary64_to_bid32 (UINT32
* pres
, double *px
1869 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1870 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1872 extern void binary64_to_bid64 (UINT64
* pres
, double *px
1873 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1874 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1876 extern void binary64_to_bid128 (UINT128
* pres
, double *px
1877 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1878 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1880 extern void bid32_to_binary32 (float *pres
, UINT32
* px
1881 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1882 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1884 extern void bid32_to_binary64 (double *pres
, UINT32
* px
1885 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1886 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1888 extern void bid32_to_binary80 (BINARY80
* pres
, UINT32
* px
1889 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1890 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1892 extern void bid32_to_binary128 (BINARY128
* pres
, UINT32
* px
1893 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1894 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1896 extern void binary32_to_bid32 (UINT32
* pres
, float *px
1897 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1898 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1900 extern void binary32_to_bid64 (UINT64
* pres
, float *px
1901 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1902 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1904 extern void binary32_to_bid128 (UINT128
* pres
, float *px
1905 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1906 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1908 extern void binary80_to_bid32 (UINT32
* pres
, BINARY80
* px
1909 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1910 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1912 extern void binary80_to_bid64 (UINT64
* pres
, BINARY80
* px
1913 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1914 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1916 extern void binary80_to_bid128 (UINT128
* pres
, BINARY80
* px
1917 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1918 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1920 extern void is754 (int *retval
);
1922 extern void is754R (int *retval
);
1924 extern void signalException (_IDEC_flags
*
1925 pflagsmask _EXC_FLAGS_PARAM
);
1927 extern void lowerFlags (_IDEC_flags
* pflagsmask _EXC_FLAGS_PARAM
);
1929 extern void testFlags (_IDEC_flags
* praised
,
1930 _IDEC_flags
* pflagsmask _EXC_FLAGS_PARAM
);
1932 extern void testSavedFlags (_IDEC_flags
* praised
,
1933 _IDEC_flags
* psavedflags
,
1934 _IDEC_flags
* pflagsmask
);
1936 extern void restoreFlags (_IDEC_flags
* pflagsvalues
,
1938 pflagsmask _EXC_FLAGS_PARAM
);
1940 extern void saveFlags (_IDEC_flags
* pflagsvalues
,
1941 _IDEC_flags
* pflagsmask _EXC_FLAGS_PARAM
);
1943 void getDecimalRoundingDirection (_IDEC_round
*
1944 rounding_mode _RND_MODE_PARAM
);
1946 void setDecimalRoundingDirection (_IDEC_round
*
1947 rounding_mode _RND_MODE_PARAM
);
1951 extern UINT32
bid_to_dpd32 (UINT32 px
);
1952 extern UINT64
bid_to_dpd64 (UINT64 px
);
1953 extern UINT128
bid_to_dpd128 (UINT128 px
);
1954 extern UINT32
dpd_to_bid32 (UINT32 px
);
1955 extern UINT64
dpd_to_bid64 (UINT64 px
);
1956 extern UINT128
dpd_to_bid128 (UINT128 px
);
1958 extern UINT128
bid128dd_add (UINT64 x
, UINT64 y
1959 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1960 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1961 extern UINT128
bid128dq_add (UINT64 x
, UINT128 y
1962 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1963 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1964 extern UINT128
bid128qd_add (UINT128 x
, UINT64 y
1965 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1966 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1967 extern UINT128
bid128_add (UINT128 x
, UINT128 y
1968 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1969 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1970 extern UINT128
bid128dd_sub (UINT64 x
, UINT64 y
1971 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1972 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1973 extern UINT128
bid128dq_sub (UINT64 x
, UINT128 y
1974 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1975 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1976 extern UINT128
bid128qd_sub (UINT128 x
, UINT64 y
1977 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1978 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1979 extern UINT128
bid128_sub (UINT128 x
,
1980 UINT128 y _RND_MODE_PARAM
1981 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1983 extern UINT128
bid128dd_mul (UINT64 x
, UINT64 y
1984 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1985 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1986 extern UINT128
bid128dq_mul (UINT64 x
, UINT128 y
1987 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1988 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1989 extern UINT128
bid128qd_mul (UINT128 x
, UINT64 y
1990 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1991 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1992 extern UINT128
bid128_mul (UINT128 x
, UINT128 y
1993 _RND_MODE_PARAM _EXC_FLAGS_PARAM
1994 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
1995 extern UINT128
bid128_div (UINT128 x
,
1996 UINT128 y _RND_MODE_PARAM
1997 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
1999 extern UINT128
bid128dd_div (UINT64 x
, UINT64 y
2000 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2001 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2002 extern UINT128
bid128dq_div (UINT64 x
, UINT128 y
2003 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2004 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2005 extern UINT128
bid128qd_div (UINT128 x
, UINT64 y
2006 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2007 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2008 extern UINT128
bid128_fma (UINT128 x
, UINT128 y
, UINT128 z
2009 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2010 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2011 extern UINT128
bid128ddd_fma (UINT64 x
, UINT64 y
, UINT64 z
2012 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2013 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2014 extern UINT128
bid128ddq_fma (UINT64 x
, UINT64 y
, UINT128 z
2015 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2016 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2017 extern UINT128
bid128dqd_fma (UINT64 x
, UINT128 y
, UINT64 z
2018 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2019 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2020 extern UINT128
bid128dqq_fma (UINT64 x
, UINT128 y
,
2022 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2023 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2024 extern UINT128
bid128qdd_fma (UINT128 x
, UINT64 y
, UINT64 z
2025 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2026 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2027 extern UINT128
bid128qdq_fma (UINT128 x
, UINT64 y
,
2029 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2030 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2031 extern UINT128
bid128qqd_fma (UINT128 x
, UINT128 y
,
2033 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2034 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2035 // Note: bid128qqq_fma is represented by bid128_fma
2036 // Note: bid64ddd_fma is represented by bid64_fma
2037 extern UINT64
bid64ddq_fma (UINT64 x
, UINT64 y
,
2039 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2040 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2041 extern UINT64
bid64dqd_fma (UINT64 x
, UINT128 y
,
2043 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2044 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2045 extern UINT64
bid64dqq_fma (UINT64 x
, UINT128 y
,
2047 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2048 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2049 extern UINT64
bid64qdd_fma (UINT128 x
, UINT64 y
,
2051 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2052 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2053 extern UINT64
bid64qdq_fma (UINT128 x
, UINT64 y
,
2055 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2056 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2057 extern UINT64
bid64qqd_fma (UINT128 x
, UINT128 y
,
2059 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2060 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2061 extern UINT64
bid64qqq_fma (UINT128 x
, UINT128 y
,
2063 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2064 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2066 extern UINT128
bid128_sqrt (UINT128 x _RND_MODE_PARAM
2067 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
2069 extern UINT128
bid128d_sqrt (UINT64 x
2070 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2071 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2073 extern UINT64
bid64_add (UINT64 x
, UINT64 y
2074 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2075 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2076 extern UINT64
bid64dq_add (UINT64 x
, UINT128 y
2077 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2078 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2079 extern UINT64
bid64qd_add (UINT128 x
, UINT64 y
2080 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2081 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2082 extern UINT64
bid64qq_add (UINT128 x
, UINT128 y
2083 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2084 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2085 extern UINT64
bid64_sub (UINT64 x
,
2086 UINT64 y _RND_MODE_PARAM
2087 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
2089 extern UINT64
bid64dq_sub (UINT64 x
, UINT128 y
2090 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2091 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2092 extern UINT64
bid64qd_sub (UINT128 x
, UINT64 y
2093 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2094 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2095 extern UINT64
bid64qq_sub (UINT128 x
, UINT128 y
2096 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2097 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2098 extern UINT64
bid64_mul (UINT64 x
, UINT64 y
2099 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2100 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2101 extern UINT64
bid64dq_mul (UINT64 x
, UINT128 y
2102 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2103 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2104 extern UINT64
bid64qd_mul (UINT128 x
, UINT64 y
2105 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2106 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2107 extern UINT64
bid64qq_mul (UINT128 x
, UINT128 y
2108 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2109 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2110 extern UINT64
bid64_div (UINT64 x
,
2111 UINT64 y _RND_MODE_PARAM
2112 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
2114 extern UINT64
bid64dq_div (UINT64 x
, UINT128 y
2115 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2116 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2117 extern UINT64
bid64qd_div (UINT128 x
, UINT64 y
2118 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2119 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2120 extern UINT64
bid64qq_div (UINT128 x
, UINT128 y
2121 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2122 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2123 extern UINT64
bid64_fma (UINT64 x
, UINT64 y
,
2124 UINT64 z _RND_MODE_PARAM
2125 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
2127 extern UINT64
bid64_sqrt (UINT64 x _RND_MODE_PARAM
2128 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
2130 extern UINT64
bid64q_sqrt (UINT128 x
2131 _RND_MODE_PARAM _EXC_FLAGS_PARAM
2132 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2134 extern char bid128_to_int8_rnint (UINT128 x
2138 extern char bid128_to_int8_xrnint (UINT128 x
2142 extern char bid128_to_int8_rninta (UINT128 x
2146 extern char bid128_to_int8_xrninta (UINT128 x
2150 extern char bid128_to_int8_int (UINT128 x _EXC_FLAGS_PARAM
2151 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2152 extern char bid128_to_int8_xint (UINT128 x _EXC_FLAGS_PARAM
2153 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2154 extern char bid128_to_int8_floor (UINT128 x
2158 extern char bid128_to_int8_xfloor (UINT128 x
2162 extern char bid128_to_int8_ceil (UINT128 x _EXC_FLAGS_PARAM
2163 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2164 extern char bid128_to_int8_xceil (UINT128 x
2168 extern short bid128_to_int16_rnint (UINT128 x
2172 extern short bid128_to_int16_xrnint (UINT128 x
2176 extern short bid128_to_int16_rninta (UINT128 x
2180 extern short bid128_to_int16_xrninta (UINT128 x
2184 extern short bid128_to_int16_int (UINT128 x _EXC_FLAGS_PARAM
2187 extern short bid128_to_int16_xint (UINT128 x _EXC_FLAGS_PARAM
2190 extern short bid128_to_int16_floor (UINT128 x
2194 extern short bid128_to_int16_xfloor (UINT128 x
2198 extern short bid128_to_int16_ceil (UINT128 x _EXC_FLAGS_PARAM
2201 extern short bid128_to_int16_xceil (UINT128 x
2205 extern unsigned char bid128_to_uint8_rnint (UINT128 x
2209 extern unsigned char bid128_to_uint8_xrnint (UINT128 x
2213 extern unsigned char bid128_to_uint8_rninta (UINT128 x
2217 extern unsigned char bid128_to_uint8_xrninta (UINT128 x
2221 extern unsigned char bid128_to_uint8_int (UINT128 x
2225 extern unsigned char bid128_to_uint8_xint (UINT128 x
2229 extern unsigned char bid128_to_uint8_floor (UINT128 x
2233 extern unsigned char bid128_to_uint8_xfloor (UINT128 x
2237 extern unsigned char bid128_to_uint8_ceil (UINT128 x
2241 extern unsigned char bid128_to_uint8_xceil (UINT128 x
2245 extern unsigned short bid128_to_uint16_rnint (UINT128 x
2249 extern unsigned short bid128_to_uint16_xrnint (UINT128 x
2253 extern unsigned short bid128_to_uint16_rninta (UINT128 x
2257 extern unsigned short bid128_to_uint16_xrninta (UINT128 x
2261 extern unsigned short bid128_to_uint16_int (UINT128 x
2265 extern unsigned short bid128_to_uint16_xint (UINT128 x
2269 extern unsigned short bid128_to_uint16_floor (UINT128 x
2273 extern unsigned short bid128_to_uint16_xfloor (UINT128 x
2277 extern unsigned short bid128_to_uint16_ceil (UINT128 x
2281 extern unsigned short bid128_to_uint16_xceil (UINT128 x
2285 extern int bid128_to_int32_rnint (UINT128 x _EXC_FLAGS_PARAM
2288 extern int bid128_to_int32_xrnint (UINT128 x _EXC_FLAGS_PARAM
2291 extern int bid128_to_int32_rninta (UINT128 x _EXC_FLAGS_PARAM
2294 extern int bid128_to_int32_xrninta (UINT128 x _EXC_FLAGS_PARAM
2297 extern int bid128_to_int32_int (UINT128 x _EXC_FLAGS_PARAM
2298 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2299 extern int bid128_to_int32_xint (UINT128 x _EXC_FLAGS_PARAM
2300 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2301 extern int bid128_to_int32_floor (UINT128 x _EXC_FLAGS_PARAM
2304 extern int bid128_to_int32_xfloor (UINT128 x _EXC_FLAGS_PARAM
2307 extern int bid128_to_int32_ceil (UINT128 x _EXC_FLAGS_PARAM
2308 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2309 extern int bid128_to_int32_xceil (UINT128 x _EXC_FLAGS_PARAM
2312 extern unsigned int bid128_to_uint32_rnint (UINT128 x
2316 extern unsigned int bid128_to_uint32_xrnint (UINT128 x
2320 extern unsigned int bid128_to_uint32_rninta (UINT128 x
2324 extern unsigned int bid128_to_uint32_xrninta (UINT128 x
2328 extern unsigned int bid128_to_uint32_int (UINT128 x
2332 extern unsigned int bid128_to_uint32_xint (UINT128 x
2336 extern unsigned int bid128_to_uint32_floor (UINT128 x
2340 extern unsigned int bid128_to_uint32_xfloor (UINT128 x
2344 extern unsigned int bid128_to_uint32_ceil (UINT128 x
2348 extern unsigned int bid128_to_uint32_xceil (UINT128 x
2352 extern SINT64
bid128_to_int64_rnint (UINT128 x _EXC_FLAGS_PARAM
2355 extern SINT64
bid128_to_int64_xrnint (UINT128 x _EXC_FLAGS_PARAM
2358 extern SINT64
bid128_to_int64_rninta (UINT128 x _EXC_FLAGS_PARAM
2361 extern SINT64
bid128_to_int64_xrninta (UINT128 x _EXC_FLAGS_PARAM
2364 extern SINT64
bid128_to_int64_int (UINT128 x _EXC_FLAGS_PARAM
2367 extern SINT64
bid128_to_int64_xint (UINT128 x _EXC_FLAGS_PARAM
2370 extern SINT64
bid128_to_int64_floor (UINT128 x _EXC_FLAGS_PARAM
2373 extern SINT64
bid128_to_int64_xfloor (UINT128 x _EXC_FLAGS_PARAM
2376 extern SINT64
bid128_to_int64_ceil (UINT128 x _EXC_FLAGS_PARAM
2379 extern SINT64
bid128_to_int64_xceil (UINT128 x _EXC_FLAGS_PARAM
2382 extern UINT64
bid128_to_uint64_rnint (UINT128 x _EXC_FLAGS_PARAM
2385 extern UINT64
bid128_to_uint64_xrnint (UINT128 x _EXC_FLAGS_PARAM
2388 extern UINT64
bid128_to_uint64_rninta (UINT128 x _EXC_FLAGS_PARAM
2391 extern UINT64
bid128_to_uint64_xrninta (UINT128 x _EXC_FLAGS_PARAM
2394 extern UINT64
bid128_to_uint64_int (UINT128 x _EXC_FLAGS_PARAM
2397 extern UINT64
bid128_to_uint64_xint (UINT128 x _EXC_FLAGS_PARAM
2400 extern UINT64
bid128_to_uint64_floor (UINT128 x _EXC_FLAGS_PARAM
2403 extern UINT64
bid128_to_uint64_xfloor (UINT128 x _EXC_FLAGS_PARAM
2406 extern UINT64
bid128_to_uint64_ceil (UINT128 x _EXC_FLAGS_PARAM
2409 extern UINT64
bid128_to_uint64_xceil (UINT128 x _EXC_FLAGS_PARAM
2412 extern int bid64_to_int32_rnint (UINT64 x _EXC_FLAGS_PARAM
2413 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2414 extern int bid64_to_int32_xrnint (UINT64 x _EXC_FLAGS_PARAM
2417 extern int bid64_to_int32_rninta (UINT64 x _EXC_FLAGS_PARAM
2420 extern int bid64_to_int32_xrninta (UINT64 x _EXC_FLAGS_PARAM
2423 extern int bid64_to_int32_int (UINT64 x _EXC_FLAGS_PARAM
2424 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2425 extern int bid64_to_int32_xint (UINT64 x _EXC_FLAGS_PARAM
2426 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2427 extern int bid64_to_int32_floor (UINT64 x _EXC_FLAGS_PARAM
2428 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2429 extern int bid64_to_int32_xfloor (UINT64 x _EXC_FLAGS_PARAM
2432 extern int bid64_to_int32_ceil (UINT64 x _EXC_FLAGS_PARAM
2433 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2434 extern int bid64_to_int32_xceil (UINT64 x _EXC_FLAGS_PARAM
2435 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2436 extern char bid64_to_int8_rnint (UINT64 x _EXC_FLAGS_PARAM
2437 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2438 extern char bid64_to_int8_xrnint (UINT64 x _EXC_FLAGS_PARAM
2441 extern char bid64_to_int8_rninta (UINT64 x _EXC_FLAGS_PARAM
2444 extern char bid64_to_int8_xrninta (UINT64 x _EXC_FLAGS_PARAM
2447 extern char bid64_to_int8_int (UINT64 x _EXC_FLAGS_PARAM
2448 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2449 extern char bid64_to_int8_xint (UINT64 x _EXC_FLAGS_PARAM
2450 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2451 extern char bid64_to_int8_floor (UINT64 x _EXC_FLAGS_PARAM
2452 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2453 extern char bid64_to_int8_xfloor (UINT64 x _EXC_FLAGS_PARAM
2456 extern char bid64_to_int8_ceil (UINT64 x _EXC_FLAGS_PARAM
2457 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2458 extern char bid64_to_int8_xceil (UINT64 x _EXC_FLAGS_PARAM
2459 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2460 extern short bid64_to_int16_rnint (UINT64 x _EXC_FLAGS_PARAM
2463 extern short bid64_to_int16_xrnint (UINT64 x _EXC_FLAGS_PARAM
2466 extern short bid64_to_int16_rninta (UINT64 x _EXC_FLAGS_PARAM
2469 extern short bid64_to_int16_xrninta (UINT64 x _EXC_FLAGS_PARAM
2472 extern short bid64_to_int16_int (UINT64 x _EXC_FLAGS_PARAM
2473 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2474 extern short bid64_to_int16_xint (UINT64 x _EXC_FLAGS_PARAM
2477 extern short bid64_to_int16_floor (UINT64 x _EXC_FLAGS_PARAM
2480 extern short bid64_to_int16_xfloor (UINT64 x _EXC_FLAGS_PARAM
2483 extern short bid64_to_int16_ceil (UINT64 x _EXC_FLAGS_PARAM
2486 extern short bid64_to_int16_xceil (UINT64 x _EXC_FLAGS_PARAM
2489 extern unsigned char bid64_to_uint8_rnint (UINT64 x
2493 extern unsigned char bid64_to_uint8_xrnint (UINT64 x
2497 extern unsigned char bid64_to_uint8_rninta (UINT64 x
2501 extern unsigned char bid64_to_uint8_xrninta (UINT64 x
2505 extern unsigned char bid64_to_uint8_int (UINT64 x _EXC_FLAGS_PARAM
2508 extern unsigned char bid64_to_uint8_xint (UINT64 x _EXC_FLAGS_PARAM
2511 extern unsigned char bid64_to_uint8_floor (UINT64 x
2515 extern unsigned char bid64_to_uint8_xfloor (UINT64 x
2519 extern unsigned char bid64_to_uint8_ceil (UINT64 x _EXC_FLAGS_PARAM
2522 extern unsigned char bid64_to_uint8_xceil (UINT64 x
2526 extern unsigned short bid64_to_uint16_rnint (UINT64 x
2530 extern unsigned short bid64_to_uint16_xrnint (UINT64 x
2534 extern unsigned short bid64_to_uint16_rninta (UINT64 x
2538 extern unsigned short bid64_to_uint16_xrninta (UINT64 x
2542 extern unsigned short bid64_to_uint16_int (UINT64 x
2546 extern unsigned short bid64_to_uint16_xint (UINT64 x
2550 extern unsigned short bid64_to_uint16_floor (UINT64 x
2554 extern unsigned short bid64_to_uint16_xfloor (UINT64 x
2558 extern unsigned short bid64_to_uint16_ceil (UINT64 x
2562 extern unsigned short bid64_to_uint16_xceil (UINT64 x
2566 extern unsigned int bid64_to_uint32_rnint (UINT64 x
2570 extern unsigned int bid64_to_uint32_xrnint (UINT64 x
2574 extern unsigned int bid64_to_uint32_rninta (UINT64 x
2578 extern unsigned int bid64_to_uint32_xrninta (UINT64 x
2582 extern unsigned int bid64_to_uint32_int (UINT64 x _EXC_FLAGS_PARAM
2585 extern unsigned int bid64_to_uint32_xint (UINT64 x _EXC_FLAGS_PARAM
2588 extern unsigned int bid64_to_uint32_floor (UINT64 x
2592 extern unsigned int bid64_to_uint32_xfloor (UINT64 x
2596 extern unsigned int bid64_to_uint32_ceil (UINT64 x _EXC_FLAGS_PARAM
2599 extern unsigned int bid64_to_uint32_xceil (UINT64 x
2603 extern SINT64
bid64_to_int64_rnint (UINT64 x _EXC_FLAGS_PARAM
2606 extern SINT64
bid64_to_int64_xrnint (UINT64 x _EXC_FLAGS_PARAM
2609 extern SINT64
bid64_to_int64_rninta (UINT64 x _EXC_FLAGS_PARAM
2612 extern SINT64
bid64_to_int64_xrninta (UINT64 x _EXC_FLAGS_PARAM
2615 extern SINT64
bid64_to_int64_int (UINT64 x _EXC_FLAGS_PARAM
2618 extern SINT64
bid64_to_int64_xint (UINT64 x _EXC_FLAGS_PARAM
2621 extern SINT64
bid64_to_int64_floor (UINT64 x _EXC_FLAGS_PARAM
2624 extern SINT64
bid64_to_int64_xfloor (UINT64 x _EXC_FLAGS_PARAM
2627 extern SINT64
bid64_to_int64_ceil (UINT64 x _EXC_FLAGS_PARAM
2630 extern SINT64
bid64_to_int64_xceil (UINT64 x _EXC_FLAGS_PARAM
2633 extern UINT64
bid64_to_uint64_rnint (UINT64 x _EXC_FLAGS_PARAM
2636 extern UINT64
bid64_to_uint64_xrnint (UINT64 x _EXC_FLAGS_PARAM
2639 extern UINT64
bid64_to_uint64_rninta (UINT64 x _EXC_FLAGS_PARAM
2642 extern UINT64
bid64_to_uint64_xrninta (UINT64 x _EXC_FLAGS_PARAM
2645 extern UINT64
bid64_to_uint64_int (UINT64 x _EXC_FLAGS_PARAM
2648 extern UINT64
bid64_to_uint64_xint (UINT64 x _EXC_FLAGS_PARAM
2651 extern UINT64
bid64_to_uint64_floor (UINT64 x _EXC_FLAGS_PARAM
2654 extern UINT64
bid64_to_uint64_xfloor (UINT64 x _EXC_FLAGS_PARAM
2657 extern UINT64
bid64_to_uint64_ceil (UINT64 x _EXC_FLAGS_PARAM
2660 extern UINT64
bid64_to_uint64_xceil (UINT64 x _EXC_FLAGS_PARAM
2664 extern int bid64_quiet_equal (UINT64 x
, UINT64 y
2665 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
2667 extern int bid64_quiet_greater (UINT64 x
,
2668 UINT64 y _EXC_FLAGS_PARAM
2669 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2670 extern int bid64_quiet_greater_equal (UINT64 x
,
2671 UINT64 y _EXC_FLAGS_PARAM
2674 extern int bid64_quiet_greater_unordered (UINT64 x
,
2675 UINT64 y _EXC_FLAGS_PARAM
2678 extern int bid64_quiet_less (UINT64 x
,
2679 UINT64 y _EXC_FLAGS_PARAM
2680 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2681 extern int bid64_quiet_less_equal (UINT64 x
,
2682 UINT64 y _EXC_FLAGS_PARAM
2685 extern int bid64_quiet_less_unordered (UINT64 x
,
2686 UINT64 y _EXC_FLAGS_PARAM
2689 extern int bid64_quiet_not_equal (UINT64 x
,
2690 UINT64 y _EXC_FLAGS_PARAM
2693 extern int bid64_quiet_not_greater (UINT64 x
,
2694 UINT64 y _EXC_FLAGS_PARAM
2697 extern int bid64_quiet_not_less (UINT64 x
,
2698 UINT64 y _EXC_FLAGS_PARAM
2699 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2700 extern int bid64_quiet_ordered (UINT64 x
,
2701 UINT64 y _EXC_FLAGS_PARAM
2702 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2703 extern int bid64_quiet_unordered (UINT64 x
,
2704 UINT64 y _EXC_FLAGS_PARAM
2707 extern int bid64_signaling_greater (UINT64 x
,
2708 UINT64 y _EXC_FLAGS_PARAM
2711 extern int bid64_signaling_greater_equal (UINT64 x
,
2712 UINT64 y _EXC_FLAGS_PARAM
2715 extern int bid64_signaling_greater_unordered (UINT64 x
,
2720 extern int bid64_signaling_less (UINT64 x
,
2721 UINT64 y _EXC_FLAGS_PARAM
2722 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2723 extern int bid64_signaling_less_equal (UINT64 x
,
2724 UINT64 y _EXC_FLAGS_PARAM
2727 extern int bid64_signaling_less_unordered (UINT64 x
,
2732 extern int bid64_signaling_not_greater (UINT64 x
,
2733 UINT64 y _EXC_FLAGS_PARAM
2736 extern int bid64_signaling_not_less (UINT64 x
,
2737 UINT64 y _EXC_FLAGS_PARAM
2741 extern int bid128_quiet_equal (UINT128 x
, UINT128 y
2742 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
2744 extern int bid128_quiet_greater (UINT128 x
,
2745 UINT128 y _EXC_FLAGS_PARAM
2746 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2747 extern int bid128_quiet_greater_equal (UINT128 x
,
2748 UINT128 y _EXC_FLAGS_PARAM
2751 extern int bid128_quiet_greater_unordered (UINT128 x
,
2756 extern int bid128_quiet_less (UINT128 x
,
2757 UINT128 y _EXC_FLAGS_PARAM
2758 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2759 extern int bid128_quiet_less_equal (UINT128 x
,
2760 UINT128 y _EXC_FLAGS_PARAM
2763 extern int bid128_quiet_less_unordered (UINT128 x
,
2764 UINT128 y _EXC_FLAGS_PARAM
2767 extern int bid128_quiet_not_equal (UINT128 x
,
2768 UINT128 y _EXC_FLAGS_PARAM
2771 extern int bid128_quiet_not_greater (UINT128 x
,
2772 UINT128 y _EXC_FLAGS_PARAM
2775 extern int bid128_quiet_not_less (UINT128 x
,
2776 UINT128 y _EXC_FLAGS_PARAM
2779 extern int bid128_quiet_ordered (UINT128 x
,
2780 UINT128 y _EXC_FLAGS_PARAM
2781 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2782 extern int bid128_quiet_unordered (UINT128 x
,
2783 UINT128 y _EXC_FLAGS_PARAM
2786 extern int bid128_signaling_greater (UINT128 x
,
2787 UINT128 y _EXC_FLAGS_PARAM
2790 extern int bid128_signaling_greater_equal (UINT128 x
,
2795 extern int bid128_signaling_greater_unordered (UINT128 x
,
2800 extern int bid128_signaling_less (UINT128 x
,
2801 UINT128 y _EXC_FLAGS_PARAM
2804 extern int bid128_signaling_less_equal (UINT128 x
,
2805 UINT128 y _EXC_FLAGS_PARAM
2808 extern int bid128_signaling_less_unordered (UINT128 x
,
2813 extern int bid128_signaling_not_greater (UINT128 x
,
2814 UINT128 y _EXC_FLAGS_PARAM
2817 extern int bid128_signaling_not_less (UINT128 x
,
2818 UINT128 y _EXC_FLAGS_PARAM
2822 extern UINT64
bid64_round_integral_exact (UINT64 x
2827 extern UINT64
bid64_round_integral_nearest_even (UINT64 x
2831 extern UINT64
bid64_round_integral_negative (UINT64 x
2835 extern UINT64
bid64_round_integral_positive (UINT64 x
2839 extern UINT64
bid64_round_integral_zero (UINT64 x _EXC_FLAGS_PARAM
2842 extern UINT64
bid64_round_integral_nearest_away (UINT64 x
2847 extern UINT128
bid128_round_integral_exact (UINT128 x
2852 extern UINT128
bid128_round_integral_nearest_even (UINT128 x
2856 extern UINT128
bid128_round_integral_negative (UINT128 x
2860 extern UINT128
bid128_round_integral_positive (UINT128 x
2864 extern UINT128
bid128_round_integral_zero (UINT128 x
2868 extern UINT128
bid128_round_integral_nearest_away (UINT128 x
2873 extern UINT64
bid64_nextup (UINT64 x
2874 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
2876 extern UINT64
bid64_nextdown (UINT64 x _EXC_FLAGS_PARAM
2877 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2878 extern UINT64
bid64_nextafter (UINT64 x
,
2879 UINT64 y _EXC_FLAGS_PARAM
2880 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2882 extern UINT128
bid128_nextup (UINT128 x
2883 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
2885 extern UINT128
bid128_nextdown (UINT128 x _EXC_FLAGS_PARAM
2886 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2887 extern UINT128
bid128_nextafter (UINT128 x
,
2888 UINT128 y _EXC_FLAGS_PARAM
2889 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2891 extern UINT64
bid64_minnum (UINT64 x
, UINT64 y _EXC_FLAGS_PARAM
);
2892 extern UINT64
bid64_minnum_mag (UINT64 x
,
2893 UINT64 y _EXC_FLAGS_PARAM
);
2894 extern UINT64
bid64_maxnum (UINT64 x
, UINT64 y _EXC_FLAGS_PARAM
);
2895 extern UINT64
bid64_maxnum_mag (UINT64 x
,
2896 UINT64 y _EXC_FLAGS_PARAM
);
2898 extern UINT128
bid128_minnum (UINT128 x
,
2899 UINT128 y _EXC_FLAGS_PARAM
);
2900 extern UINT128
bid128_minnum_mag (UINT128 x
,
2901 UINT128 y _EXC_FLAGS_PARAM
);
2902 extern UINT128
bid128_maxnum (UINT128 x
,
2903 UINT128 y _EXC_FLAGS_PARAM
);
2904 extern UINT128
bid128_maxnum_mag (UINT128 x
,
2905 UINT128 y _EXC_FLAGS_PARAM
);
2907 extern UINT64
bid64_from_int32 (int x _EXC_MASKS_PARAM
2909 extern UINT64
bid64_from_uint32 (unsigned int x _EXC_MASKS_PARAM
2911 extern UINT64
bid64_from_int64 (SINT64 x _RND_MODE_PARAM
2912 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
2914 extern UINT64
bid64_from_uint64 (UINT64 _RND_MODE_PARAM
2915 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
2917 extern UINT128
bid128_from_int32 (int x _EXC_MASKS_PARAM
2919 extern UINT128
bid128_from_uint32 (unsigned int x _EXC_MASKS_PARAM
2921 extern UINT128
bid128_from_int64 (SINT64 x _EXC_MASKS_PARAM
2923 extern UINT128
bid128_from_uint64 (UINT64 x _EXC_MASKS_PARAM
2926 extern int bid64_isSigned (UINT64 x _EXC_MASKS_PARAM
2928 extern int bid64_isNormal (UINT64 x _EXC_MASKS_PARAM
2930 extern int bid64_isSubnormal (UINT64 x _EXC_MASKS_PARAM
2932 extern int bid64_isFinite (UINT64 x _EXC_MASKS_PARAM
2934 extern int bid64_isZero (UINT64 x _EXC_MASKS_PARAM
2936 extern int bid64_isInf (UINT64 x _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2937 extern int bid64_isSignaling (UINT64 x _EXC_MASKS_PARAM
2939 extern int bid64_isCanonical (UINT64 x _EXC_MASKS_PARAM
2941 extern int bid64_isNaN (UINT64 x _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2942 extern UINT64
bid64_copy (UINT64 x _EXC_MASKS_PARAM
2944 extern UINT64
bid64_negate (UINT64 x _EXC_MASKS_PARAM
2946 extern UINT64
bid64_abs (UINT64 x _EXC_MASKS_PARAM
2948 extern UINT64
bid64_copySign (UINT64 x
,
2949 UINT64 y _EXC_MASKS_PARAM
2951 extern int bid64_class (UINT64 x _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2952 extern int bid64_sameQuantum (UINT64 x
, UINT64 y
2953 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2954 extern int bid64_totalOrder (UINT64 x
, UINT64 y
2955 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2956 extern int bid64_totalOrderMag (UINT64 x
, UINT64 y
2957 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2958 extern int bid64_radix (UINT64 x _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
2960 extern int bid128_isSigned (UINT128 x _EXC_MASKS_PARAM
2962 extern int bid128_isNormal (UINT128 x _EXC_MASKS_PARAM
2964 extern int bid128_isSubnormal (UINT128 x _EXC_MASKS_PARAM
2966 extern int bid128_isFinite (UINT128 x _EXC_MASKS_PARAM
2968 extern int bid128_isZero (UINT128 x _EXC_MASKS_PARAM
2970 extern int bid128_isInf (UINT128 x _EXC_MASKS_PARAM
2972 extern int bid128_isSignaling (UINT128 x _EXC_MASKS_PARAM
2974 extern int bid128_isCanonical (UINT128 x _EXC_MASKS_PARAM
2976 extern int bid128_isNaN (UINT128 x _EXC_MASKS_PARAM
2978 extern UINT128
bid128_copy (UINT128 x _EXC_MASKS_PARAM
2980 extern UINT128
bid128_negate (UINT128 x _EXC_MASKS_PARAM
2982 extern UINT128
bid128_abs (UINT128 x _EXC_MASKS_PARAM
2984 extern UINT128
bid128_copySign (UINT128 x
,
2985 UINT128 y _EXC_MASKS_PARAM
2987 extern int bid128_class (UINT128 x _EXC_MASKS_PARAM
2989 extern int bid128_sameQuantum (UINT128 x
,
2990 UINT128 y _EXC_MASKS_PARAM
2992 extern int bid128_totalOrder (UINT128 x
,
2993 UINT128 y _EXC_MASKS_PARAM
2995 extern int bid128_totalOrderMag (UINT128 x
,
2996 UINT128 y _EXC_MASKS_PARAM
2998 extern int bid128_radix (UINT128 x _EXC_MASKS_PARAM
3001 extern UINT64
bid64_rem (UINT64 x
, UINT64 y
3003 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3004 extern int bid64_logb (UINT64 x _EXC_FLAGS_PARAM
3005 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3006 extern UINT64
bid64_scalb (UINT64 x
,
3007 int n _RND_MODE_PARAM _EXC_FLAGS_PARAM
3008 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3010 extern UINT128
bid128_rem (UINT128 x
, UINT128 y
3012 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3013 extern int bid128_logb (UINT128 x
3014 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM
3016 extern UINT128
bid128_scalb (UINT128 x
,
3017 int n _RND_MODE_PARAM _EXC_FLAGS_PARAM
3018 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3020 extern UINT64
bid32_to_bid64 (UINT32 x _EXC_FLAGS_PARAM
3021 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3022 extern UINT128
bid32_to_bid128 (UINT32 x _EXC_FLAGS_PARAM
3023 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3024 extern UINT128
bid64_to_bid128 (UINT64 x _EXC_FLAGS_PARAM
3025 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3026 extern UINT32
bid64_to_bid32 (UINT64 x
3027 _RND_MODE_PARAM _EXC_FLAGS_PARAM
3028 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3029 extern UINT32
bid128_to_bid32 (UINT128 x _RND_MODE_PARAM
3031 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3032 extern UINT64
bid128_to_bid64 (UINT128 x _RND_MODE_PARAM
3034 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3036 extern void bid64_to_string (char *ps
, UINT64 x
3038 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3039 extern UINT64
bid64_from_string (char *ps
3040 _RND_MODE_PARAM _EXC_FLAGS_PARAM
3041 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3042 extern void bid128_to_string (char *str
, UINT128 x
3044 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3045 extern UINT128
bid128_from_string (char *ps
3046 _RND_MODE_PARAM _EXC_FLAGS_PARAM
3050 extern UINT64
bid64_quantize (UINT64 x
, UINT64 y
3051 _RND_MODE_PARAM _EXC_FLAGS_PARAM
3052 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3054 extern UINT128
bid128_quantize (UINT128 x
, UINT128 y
3057 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3060 extern UINT32
binary128_to_bid32 (BINARY128 x
3066 extern UINT64
binary128_to_bid64 (BINARY128 x
3072 extern UINT128
binary128_to_bid128 (BINARY128 x
3078 extern UINT32
binary64_to_bid32 (double x
3081 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3083 extern UINT64
binary64_to_bid64 (double x
3086 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3088 extern UINT128
binary64_to_bid128 (double x
3094 extern UINT32
binary80_to_bid32 (BINARY80 x
3097 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3099 extern UINT64
binary80_to_bid64 (BINARY80 x
3102 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3104 extern UINT128
binary80_to_bid128 (BINARY80 x
3110 extern UINT32
binary32_to_bid32 (float x
3113 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3115 extern UINT64
binary32_to_bid64 (float x
3118 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3120 extern UINT128
binary32_to_bid128 (float x
3126 extern float bid128_to_binary32 (UINT128 x
3127 _RND_MODE_PARAM _EXC_FLAGS_PARAM
3128 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3130 extern double bid128_to_binary64 (UINT128 x
3131 _RND_MODE_PARAM _EXC_FLAGS_PARAM
3135 extern BINARY80
bid128_to_binary80 (UINT128 x
3141 extern BINARY128
bid128_to_binary128 (UINT128 x
3147 extern float bid64_to_binary32 (UINT64 x
3148 _RND_MODE_PARAM _EXC_FLAGS_PARAM
3149 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3151 extern double bid64_to_binary64 (UINT64 x
3152 _RND_MODE_PARAM _EXC_FLAGS_PARAM
3153 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3155 extern BINARY80
bid64_to_binary80 (UINT64 x
3161 extern BINARY128
bid64_to_binary128 (UINT64 x
3167 extern float bid32_to_binary32 (UINT32 x
3168 _RND_MODE_PARAM _EXC_FLAGS_PARAM
3169 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3171 extern double bid32_to_binary64 (UINT32 x
3172 _RND_MODE_PARAM _EXC_FLAGS_PARAM
3173 _EXC_MASKS_PARAM _EXC_INFO_PARAM
);
3175 extern BINARY80
bid32_to_binary80 (UINT32 x
3181 extern BINARY128
bid32_to_binary128 (UINT32 x
3187 extern int is754 (void);
3189 extern int is754R (void);
3191 extern void signalException (_IDEC_flags flagsmask
3194 extern void lowerFlags (_IDEC_flags flagsmask _EXC_FLAGS_PARAM
);
3196 extern _IDEC_flags
testFlags (_IDEC_flags flagsmask
3199 extern _IDEC_flags
testSavedFlags (_IDEC_flags savedflags
,
3200 _IDEC_flags flagsmask
);
3202 extern void restoreFlags (_IDEC_flags flagsvalues
,
3203 _IDEC_flags flagsmask _EXC_FLAGS_PARAM
);
3205 extern _IDEC_flags
saveFlags (_IDEC_flags flagsmask
3208 #if !DECIMAL_GLOBAL_ROUNDING
3209 _IDEC_round
getDecimalRoundingDirection (_IDEC_round rnd_mode
);
3211 _IDEC_round
getDecimalRoundingDirection (void);
3214 #if !DECIMAL_GLOBAL_ROUNDING
3215 _IDEC_round
setDecimalRoundingDirection (_IDEC_round
3219 void setDecimalRoundingDirection (_IDEC_round rounding_mode
);
3224 // Internal Functions
3227 round64_2_18 (int q
,
3232 int *ptr_is_midpoint_lt_even
,
3233 int *ptr_is_midpoint_gt_even
,
3234 int *ptr_is_inexact_lt_midpoint
,
3235 int *ptr_is_inexact_gt_midpoint
);
3238 round128_19_38 (int q
,
3241 UINT128
* ptr_Cstar
,
3243 int *ptr_is_midpoint_lt_even
,
3244 int *ptr_is_midpoint_gt_even
,
3245 int *ptr_is_inexact_lt_midpoint
,
3246 int *ptr_is_inexact_gt_midpoint
);
3249 round192_39_57 (int q
,
3252 UINT192
* ptr_Cstar
,
3254 int *ptr_is_midpoint_lt_even
,
3255 int *ptr_is_midpoint_gt_even
,
3256 int *ptr_is_inexact_lt_midpoint
,
3257 int *ptr_is_inexact_gt_midpoint
);
3260 round256_58_76 (int q
,
3263 UINT256
* ptr_Cstar
,
3265 int *ptr_is_midpoint_lt_even
,
3266 int *ptr_is_midpoint_gt_even
,
3267 int *ptr_is_inexact_lt_midpoint
,
3268 int *ptr_is_inexact_gt_midpoint
);
3272 // Prototypes for Internal Functions
3274 extern UINT32
bid_to_bid32 (UINT32
);
3275 extern UINT64
bid_to_bid64 (UINT64
);
3276 extern UINT128
bid_to_bid128 (UINT128
);
3277 extern UINT32
bid32_canonize (UINT32
);
3278 extern UINT64
bid64_canonize (UINT64
);
3279 extern UINT128
bid128_canonize (UINT128
);