GnuCOBOL
2.0
A free COBOL compiler
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <math.h>
#include "libcob.h"
#include "coblocal.h"
Go to the source code of this file.
Macros | |
#define | _GNU_SOURCE 1 |
#define | COB_LIB_EXPIMP |
#define | DECIMAL_CHECK(d1, d2) |
#define | TOLERANCE (double) 0.0000001 |
#define | FLOAT_EQ(x, y, t) (fabs(((x-y)/x)) < t) |
Variables | |
static cob_global * | cobglobptr |
static const unsigned char | packed_bytes [] |
static cob_decimal | cob_d1 |
static cob_decimal | cob_d2 |
static cob_decimal | cob_d3 |
static cob_decimal | cob_d_remainder |
static cob_decimal * | cob_decimal_base |
static mpz_t | cob_mexp |
static mpz_t | cob_mpzt |
static mpz_t | cob_mpzt2 |
static mpz_t | cob_mpz_ten34m1 |
static mpz_t | cob_mpz_ten16m1 |
static mpz_t | cob_mpze10 [COB_MAX_BINARY] |
static mpf_t | cob_mpft |
static mpf_t | cob_mpft_get |
static unsigned char | packed_value [20] |
static cob_u64_t | last_packed_val |
Definition at line 47 of file numeric.c.
Referenced by cob_decimal_add(), cob_decimal_div(), cob_decimal_mul(), and cob_decimal_sub().
#define FLOAT_EQ | ( | x, | |
y, | |||
t | |||
) | (fabs(((x-y)/x)) < t) |
Definition at line 2312 of file numeric.c.
Referenced by cob_cmp_float().
#define TOLERANCE (double) 0.0000001 |
Definition at line 2310 of file numeric.c.
Referenced by cob_cmp_float().
|
static |
Definition at line 411 of file numeric.c.
References cob_decimal::scale, and shift_decimal().
Referenced by cob_decimal_add(), cob_decimal_cmp(), and cob_decimal_sub().
Definition at line 1931 of file numeric.c.
References cob_decimal_add(), cob_decimal_get_field(), and cob_decimal_set_field().
Referenced by get__reserved__lists_().
int cob_add_int | ( | cob_field * | f, |
const int | n, | ||
const int | opt | ||
) |
Definition at line 2195 of file numeric.c.
References cob_decimal_get_field(), cob_decimal_set_field(), COB_FIELD_SCALE, COB_FIELD_TYPE, cob_mexp, cob_sli_t, COB_TYPE_NUMERIC_DISPLAY, COB_TYPE_NUMERIC_FLOAT, COB_TYPE_NUMERIC_FP_BIN128, COB_TYPE_NUMERIC_PACKED, cob_uli_t, cob_decimal::scale, unlikely, and cob_decimal::value.
Referenced by cob_inspect_characters(), cob_linage_write_opt(), cob_sub_int(), cob_unstring_tallying(), cobxref_(), GCic_(), inspect_common(), LISTING_(), and relative_read_next().
|
static |
Definition at line 237 of file numeric.c.
References COB_BSWAP_64, COB_FIELD_BINARY_SWAP, cob_s64_t, cob_field::data, num_byte_memcpy(), and cob_field::size.
Referenced by cob_decimal_set_binary(), and cob_print_realbin().
|
static |
Definition at line 263 of file numeric.c.
References COB_BSWAP_64, COB_FIELD_BINARY_SWAP, cob_u64_t, cob_field::data, num_byte_memcpy(), and cob_field::size.
Referenced by cob_decimal_set_binary(), and cob_print_realbin().
|
static |
Definition at line 301 of file numeric.c.
References COB_BSWAP_64, COB_FIELD_BINARY_SWAP, cob_field::data, num_byte_memcpy(), and cob_field::size.
Referenced by cob_decimal_get_binary().
|
static |
Definition at line 283 of file numeric.c.
References COB_BSWAP_64, COB_FIELD_BINARY_SWAP, cob_field::data, num_byte_memcpy(), and cob_field::size.
Referenced by cob_decimal_get_binary().
Definition at line 2315 of file numeric.c.
References cob_decimal_get_double(), cob_decimal_set_field(), COB_FIELD_TYPE, COB_TYPE_NUMERIC_DOUBLE, COB_TYPE_NUMERIC_FLOAT, d1, d2, cob_field::data, FLOAT_EQ, and TOLERANCE.
Referenced by cob_numeric_cmp().
int cob_cmp_int | ( | cob_field * | f1, |
const int | n | ||
) |
Definition at line 2257 of file numeric.c.
References cob_decimal_cmp(), cob_decimal_set_field(), cob_sli_t, cob_decimal::scale, and cob_decimal::value.
Referenced by cob_cmp().
Definition at line 2275 of file numeric.c.
References cob_decimal_cmp(), cob_decimal_set_field(), COB_FIELD_HAVE_SIGN, cob_sli_t, cob_u32_t, cob_u64_t, cob_uli_t, cob_decimal::scale, and cob_decimal::value.
int cob_cmp_numdisp | ( | const unsigned char * | data, |
const size_t | size, | ||
const cob_s64_t | n, | ||
const cob_u32_t | has_sign | ||
) |
Definition at line 2543 of file numeric.c.
References COB_D2I, cob_get_long_ebcdic_sign(), COB_MODULE_PTR, cob_s64_t, and unlikely.
Definition at line 2362 of file numeric.c.
References COB_FIELD_DIGITS, COB_FIELD_NO_SIGN_NIBBLE, cob_packed_get_sign(), cob_u64_t, cob_field::data, last_packed_val, packed_value, sign, and cob_field::size.
int cob_cmp_uint | ( | cob_field * | f1, |
const unsigned int | n | ||
) |
Definition at line 2266 of file numeric.c.
References cob_decimal_cmp(), cob_decimal_set_field(), cob_uli_t, cob_decimal::scale, and cob_decimal::value.
void cob_decimal_add | ( | cob_decimal * | d1, |
cob_decimal * | d2 | ||
) |
Definition at line 1875 of file numeric.c.
References align_decimal(), DECIMAL_CHECK, and cob_decimal::value.
Referenced by calc_mean_of_args(), calc_variance_of_args(), cob_add(), cob_intr_annuity(), cob_intr_binop(), cob_intr_combined_datetime(), cob_intr_mean(), cob_intr_median(), cob_intr_midrange(), cob_intr_present_value(), cob_intr_sum(), cobxref_(), and seconds_from_formatted_time().
void cob_decimal_alloc | ( | const cob_u32_t | params, |
... | |||
) |
Definition at line 2588 of file numeric.c.
References cob_u32_t, and params.
int cob_decimal_cmp | ( | cob_decimal * | d1, |
cob_decimal * | d2 | ||
) |
Definition at line 1922 of file numeric.c.
References align_decimal(), and cob_decimal::value.
Referenced by cob_cmp_int(), cob_cmp_llint(), cob_cmp_uint(), cob_intr_acos(), cob_intr_asin(), cob_numeric_cmp(), and valid_decimal_time().
void cob_decimal_div | ( | cob_decimal * | d1, |
cob_decimal * | d2 | ||
) |
Definition at line 1899 of file numeric.c.
References COB_DECIMAL_NAN, COB_EC_SIZE_ZERO_DIVIDE, COB_MAX_DIGITS, cob_set_exception(), DECIMAL_CHECK, cob_decimal::scale, shift_decimal(), unlikely, and cob_decimal::value.
Referenced by calc_mean_of_args(), calc_variance_of_args(), cob_decimal_pow(), cob_div(), cob_div_quotient(), cob_intr_annuity(), cob_intr_binop(), cob_intr_combined_datetime(), cob_intr_mean(), cob_intr_median(), cob_intr_midrange(), cob_intr_present_value(), and cob_mod_or_rem().
|
static |
Definition at line 1693 of file numeric.c.
References COB_EC_SIZE_TRUNCATION, COB_FIELD_SCALE, cob_mpzt, cob_mpzt2, cob_set_exception(), COB_STORE_AWAY_FROM_ZERO, COB_STORE_MASK, COB_STORE_NEAR_AWAY_FROM_ZERO, COB_STORE_NEAR_EVEN, COB_STORE_NEAR_TOWARD_ZERO, COB_STORE_PROHIBITED, COB_STORE_TOWARD_GREATER, COB_STORE_TOWARD_LESSER, COB_STORE_TRUNCATION, cob_uli_t, cob_decimal::scale, shift_decimal(), sign, and cob_decimal::value.
Referenced by cob_decimal_get_field().
|
static |
Definition at line 1507 of file numeric.c.
References cob_binary_set_int64(), cob_binary_set_uint64(), COB_EC_SIZE_OVERFLOW, __cob_global::cob_exception_code, COB_FIELD_BINARY_TRUNC, COB_FIELD_DIGITS, COB_FIELD_HAVE_SIGN, cob_mpze10, cob_mpzt, cob_s64_t, cob_set_exception(), COB_STORE_TRUNC_ON_OVERFLOW, cob_u64_t, cob_field::data, overflow, sign, cob_field::size, unlikely, and cob_decimal::value.
Referenced by cob_decimal_get_field().
|
static |
Definition at line 1371 of file numeric.c.
References COB_EC_SIZE_OVERFLOW, __cob_global::cob_exception_code, COB_FIELD_DATA, COB_FIELD_SIZE, cob_gmp_free(), COB_PUT_SIGN, cob_set_exception(), NULL, sign, unlikely, and cob_decimal::value.
Referenced by cob_decimal_get_field().
|
static |
Definition at line 877 of file numeric.c.
References cob_mexp, cob_mpft, cob_mpft_get, cob_sli_t, cob_uli_t, cob_decimal::scale, unlikely, and cob_decimal::value.
Referenced by cob_cmp_float(), and cob_decimal_get_field().
int cob_decimal_get_field | ( | cob_decimal * | d, |
cob_field * | f, | ||
const int | opt | ||
) |
Definition at line 1801 of file numeric.c.
References cob_field::attr, COB_ATTR_INIT, cob_d1, cob_decimal_do_round(), cob_decimal_get_binary(), cob_decimal_get_display(), cob_decimal_get_double(), cob_decimal_get_ieee128dec(), cob_decimal_get_ieee64dec(), cob_decimal_get_packed(), COB_DECIMAL_NAN, COB_EC_SIZE_OVERFLOW, __cob_global::cob_exception_code, COB_FIELD_DIGITS, COB_FIELD_IS_FP, COB_FIELD_SCALE, COB_FIELD_TYPE, COB_FLAG_HAVE_SIGN, cob_free(), cob_malloc(), cob_move(), cob_set_exception(), COB_STORE_ROUND, COB_TYPE_NUMERIC_BINARY, COB_TYPE_NUMERIC_DISPLAY, COB_TYPE_NUMERIC_DOUBLE, COB_TYPE_NUMERIC_FLOAT, COB_TYPE_NUMERIC_FP_DEC128, COB_TYPE_NUMERIC_FP_DEC64, COB_TYPE_NUMERIC_PACKED, cob_field::data, NULL, cob_decimal::scale, shift_decimal(), cob_field::size, unlikely, and cob_decimal::value.
Referenced by cob_add(), cob_add_int(), cob_decimal_move_temp(), cob_decimal_setget_fld(), cob_div(), cob_div_quotient(), cob_div_remainder(), cob_intr_abs(), cob_intr_acos(), cob_intr_annuity(), cob_intr_asin(), cob_intr_atan(), cob_intr_binop(), cob_intr_combined_datetime(), cob_intr_cos(), cob_intr_e(), cob_intr_exp(), cob_intr_exp10(), cob_intr_factorial(), cob_intr_fraction_part(), cob_intr_highest_algebraic(), cob_intr_integer(), cob_intr_integer_part(), cob_intr_log(), cob_intr_log10(), cob_intr_lowest_algebraic(), cob_intr_mean(), cob_intr_median(), cob_intr_midrange(), cob_intr_numval_f(), cob_intr_pi(), cob_intr_present_value(), cob_intr_range(), cob_intr_seconds_from_formatted_time(), cob_intr_sin(), cob_intr_sqrt(), cob_intr_standard_deviation(), cob_intr_sum(), cob_intr_tan(), cob_intr_variance(), cob_mod_or_rem(), cob_mul(), cob_sub(), cobxref_(), LISTING_(), and numval().
|
static |
Definition at line 612 of file numeric.c.
References COB_128_MSW, COB_128_OR_EXTEND, COB_128_SIGF_1, COB_128_SIGF_2, COB_DEC_EXTEND, COB_DEC_SIGN, COB_EC_SIZE_OVERFLOW, __cob_global::cob_exception_code, COB_MPZ_ENDIAN, cob_mpz_ten34m1, cob_mpze10, cob_set_exception(), COB_STORE_KEEP_ON_OVERFLOW, cob_u64_t, cob_field::data, NULL, cob_decimal::scale, sign, and cob_decimal::value.
Referenced by cob_decimal_get_field().
|
static |
Definition at line 481 of file numeric.c.
References COB_64_OR_EXTEND, COB_64_SIGF_1, COB_64_SIGF_2, COB_DEC_EXTEND, COB_DEC_SIGN, COB_EC_SIZE_OVERFLOW, __cob_global::cob_exception_code, COB_MPZ_ENDIAN, cob_mpz_ten16m1, cob_mpze10, cob_set_exception(), COB_STORE_KEEP_ON_OVERFLOW, cob_u64_t, cob_field::data, NULL, cob_decimal::scale, sign, and cob_decimal::value.
Referenced by cob_decimal_get_field().
|
static |
Definition at line 1147 of file numeric.c.
References COB_D2I, COB_EC_SIZE_OVERFLOW, __cob_global::cob_exception_code, COB_FIELD_DIGITS, COB_FIELD_HAVE_SIGN, COB_FIELD_NO_SIGN_NIBBLE, cob_gmp_free(), cob_set_exception(), cob_set_packed_zero(), cob_field::data, NULL, sign, cob_field::size, unlikely, and cob_decimal::value.
Referenced by cob_decimal_get_field().
void cob_decimal_init | ( | cob_decimal * | d | ) |
Definition at line 321 of file numeric.c.
References COB_MPZ_DEF, cob_decimal::scale, and cob_decimal::value.
Referenced by cob_decimal_push(), and cob_init_numeric().
void cob_decimal_mul | ( | cob_decimal * | d1, |
cob_decimal * | d2 | ||
) |
Definition at line 1891 of file numeric.c.
References DECIMAL_CHECK, cob_decimal::scale, and cob_decimal::value.
Referenced by calc_variance_of_args(), cob_div_quotient(), cob_intr_binop(), cob_mod_or_rem(), cob_mul(), and cobxref_().
void cob_decimal_pop | ( | const cob_u32_t | params, |
... | |||
) |
Definition at line 2619 of file numeric.c.
References cob_free(), cob_u32_t, params, and cob_decimal::value.
|
static |
Definition at line 364 of file numeric.c.
References COB_DECIMAL_INF, COB_DECIMAL_NAN, cob_mpzt2, cob_decimal::scale, unlikely, and cob_decimal::value.
Referenced by cob_print_ieeedec().
void cob_decimal_push | ( | const cob_u32_t | params, |
... | |||
) |
Definition at line 2603 of file numeric.c.
References cob_decimal_init(), cob_malloc(), cob_u32_t, and params.
|
static |
Definition at line 356 of file numeric.c.
References cob_decimal::scale, and cob_decimal::value.
Referenced by cob_div_quotient().
|
static |
Definition at line 1424 of file numeric.c.
References cob_binary_get_sint64(), cob_binary_get_uint64(), COB_FIELD_BINARY_SWAP, COB_FIELD_HAVE_SIGN, COB_FIELD_SCALE, COB_MAX_BINARY, cob_s64_t, cob_sli_t, cob_u64_t, cob_uli_t, cob_field::data, cob_decimal::scale, cob_field::size, and cob_decimal::value.
Referenced by cob_decimal_set_field().
|
static |
Definition at line 1308 of file numeric.c.
References COB_D2I, cob_fast_malloc(), COB_FIELD_DATA, COB_FIELD_SCALE, COB_FIELD_SIZE, cob_free(), COB_GET_SIGN, COB_PUT_SIGN, cob_uli_t, cob_decimal::scale, sign, unlikely, and cob_decimal::value.
Referenced by cob_decimal_set_field().
|
static |
Definition at line 821 of file numeric.c.
References cob_gmp_free(), cob_mexp, cob_mpft, cob_sli_t, cob_u64_t, cob_uli_t, d1, NULL, cob_decimal::scale, sign, and cob_decimal::value.
Referenced by cob_decimal_set_field(), and cob_print_ieeedec().
void cob_decimal_set_field | ( | cob_decimal * | d, |
cob_field * | f | ||
) |
Definition at line 1612 of file numeric.c.
References cob_decimal_set_binary(), cob_decimal_set_display(), cob_decimal_set_double(), cob_decimal_set_ieee128dec(), cob_decimal_set_ieee64dec(), cob_decimal_set_packed(), COB_FIELD_TYPE, COB_TYPE_NUMERIC_BINARY, COB_TYPE_NUMERIC_DOUBLE, COB_TYPE_NUMERIC_FLOAT, COB_TYPE_NUMERIC_FP_DEC128, COB_TYPE_NUMERIC_FP_DEC64, COB_TYPE_NUMERIC_PACKED, and cob_field::data.
Referenced by calc_mean_of_args(), calc_variance_of_args(), cob_add(), cob_add_int(), cob_cmp_float(), cob_cmp_int(), cob_cmp_llint(), cob_cmp_uint(), cob_decimal_move_temp(), cob_decimal_setget_fld(), cob_div(), cob_div_quotient(), cob_intr_abs(), cob_intr_acos(), cob_intr_annuity(), cob_intr_asin(), cob_intr_atan(), cob_intr_binop(), cob_intr_combined_datetime(), cob_intr_cos(), cob_intr_exp(), cob_intr_exp10(), cob_intr_fraction_part(), cob_intr_integer(), cob_intr_integer_part(), cob_intr_log(), cob_intr_log10(), cob_intr_mean(), cob_intr_median(), cob_intr_midrange(), cob_intr_present_value(), cob_intr_range(), cob_intr_sign(), cob_intr_sin(), cob_intr_sqrt(), cob_intr_sum(), cob_intr_tan(), cob_mod_or_rem(), cob_mul(), cob_numeric_cmp(), cob_sub(), cobxref_(), get_fractional_seconds(), and LISTING_().
|
static |
Definition at line 688 of file numeric.c.
References COB_128_EXPO_1, COB_128_EXPO_2, COB_128_IS_EXTEND, COB_128_IS_SPECIAL, COB_128_LSW, COB_128_MSW, COB_128_OR_EXTEND, COB_128_SIGF_1, COB_128_SIGF_2, COB_DEC_SIGN, COB_DECIMAL_NAN, cob_mexp, cob_mpz_ten34m1, cob_u64_t, cob_uli_t, cob_field::data, cob_decimal::scale, sign, and cob_decimal::value.
Referenced by cob_decimal_set_field(), and cob_print_ieeedec().
|
static |
Definition at line 551 of file numeric.c.
References COB_64_EXPO_1, COB_64_EXPO_2, COB_64_IS_EXTEND, COB_64_IS_SPECIAL, COB_64_OR_EXTEND, COB_64_SIGF_1, COB_64_SIGF_2, COB_DEC_SIGN, COB_DECIMAL_NAN, cob_mexp, COB_U64_C, cob_u64_t, cob_uli_t, cob_field::data, cob_decimal::scale, sign, and cob_decimal::value.
Referenced by cob_decimal_set_field(), and cob_print_ieeedec().
void cob_decimal_set_llint | ( | cob_decimal * | d, |
const cob_s64_t | n | ||
) |
Definition at line 328 of file numeric.c.
References cob_sli_t, cob_u32_t, cob_u64_t, cob_uli_t, cob_decimal::scale, and cob_decimal::value.
|
static |
Definition at line 1087 of file numeric.c.
References COB_FIELD_DIGITS, COB_FIELD_NO_SIGN_NIBBLE, COB_FIELD_SCALE, cob_packed_get_sign(), cob_uli_t, cob_field::data, cob_decimal::scale, sign, cob_field::size, unlikely, and cob_decimal::value.
Referenced by cob_decimal_set_field().
Definition at line 2007 of file numeric.c.
References cob_decimal_get_field(), and cob_decimal_set_field().
Referenced by cob_move().
void cob_decimal_sub | ( | cob_decimal * | d1, |
cob_decimal * | d2 | ||
) |
Definition at line 1883 of file numeric.c.
References align_decimal(), DECIMAL_CHECK, and cob_decimal::value.
Referenced by calc_variance_of_args(), cob_div_quotient(), cob_intr_annuity(), cob_intr_binop(), cob_intr_range(), cob_mod_or_rem(), cob_sub(), cobxref_(), get_fractional_seconds(), and LISTING_().
Definition at line 1958 of file numeric.c.
References cob_decimal_div(), cob_decimal_get_field(), and cob_decimal_set_field().
void cob_div_quotient | ( | cob_field * | dividend, |
cob_field * | divisor, | ||
cob_field * | quotient, | ||
const int | opt | ||
) |
Definition at line 1967 of file numeric.c.
References cob_decimal_div(), cob_decimal_get_field(), cob_decimal_mul(), COB_DECIMAL_NAN, cob_decimal_set(), cob_decimal_set_field(), cob_decimal_sub(), COB_FIELD_SCALE, cob_decimal::scale, and shift_decimal().
void cob_div_remainder | ( | cob_field * | fld_remainder, |
const int | opt | ||
) |
Definition at line 2001 of file numeric.c.
References cob_decimal_get_field().
void cob_exit_numeric | ( | void | ) |
Definition at line 2637 of file numeric.c.
References cob_decimal_base, cob_free(), COB_MAX_BINARY, COB_MAX_DEC_STRUCT, cob_mexp, cob_mpft, cob_mpft_get, cob_mpz_ten16m1, cob_mpz_ten34m1, cob_mpze10, cob_mpzt, cob_mpzt2, d1, and cob_decimal::value.
Referenced by cob_terminate_routines().
|
static |
Definition at line 2477 of file numeric.c.
Referenced by cob_cmp_numdisp().
void cob_gmp_free | ( | void * | ptr | ) |
Definition at line 217 of file numeric.c.
References NULL.
Referenced by cob_decimal_get_display(), cob_decimal_get_packed(), cob_decimal_set_double(), and cob_decimal_set_mpf().
void cob_init_numeric | ( | cob_global * | lptr | ) |
Definition at line 2671 of file numeric.c.
References cob_decimal_base, cob_decimal_init(), cob_malloc(), COB_MAX_BINARY, COB_MAX_DEC_STRUCT, cob_mexp, COB_MPF_PREC, cob_mpft, cob_mpft_get, COB_MPZ_DEF, cob_mpz_ten16m1, cob_mpz_ten34m1, cob_mpze10, cob_mpzt, cob_mpzt2, cob_u32_t, cob_uli_t, d1, last_packed_val, and packed_value.
Referenced by cob_init().
Definition at line 1949 of file numeric.c.
References cob_decimal_get_field(), cob_decimal_mul(), and cob_decimal_set_field().
Definition at line 2348 of file numeric.c.
References cob_cmp_float(), cob_decimal_cmp(), cob_decimal_set_field(), COB_FIELD_TYPE, COB_TYPE_NUMERIC_DOUBLE, and COB_TYPE_NUMERIC_FLOAT.
Referenced by cob_cmp(), cob_file_sort_compare(), and sort_compare().
|
static |
Definition at line 910 of file numeric.c.
References COB_FIELD_HAVE_SIGN, COB_FIELD_NO_SIGN_NIBBLE, cob_field::data, and cob_field::size.
Referenced by cob_cmp_packed(), and cob_decimal_set_packed().
void cob_print_ieeedec | ( | const cob_field * | f, |
FILE * | fp | ||
) |
Definition at line 1647 of file numeric.c.
References cob_decimal_print(), cob_decimal_set_double(), cob_decimal_set_ieee128dec(), cob_decimal_set_ieee64dec(), COB_FIELD_TYPE, COB_TYPE_NUMERIC_DOUBLE, COB_TYPE_NUMERIC_FLOAT, COB_TYPE_NUMERIC_FP_DEC128, COB_TYPE_NUMERIC_FP_DEC64, and cob_field::data.
Referenced by display_common().
void cob_print_realbin | ( | const cob_field * | f, |
FILE * | fp, | ||
const int | size | ||
) |
Definition at line 1676 of file numeric.c.
References CB_FMT_PLLD, CB_FMT_PLLU, cob_binary_get_sint64(), cob_binary_get_uint64(), COB_FIELD_HAVE_SIGN, cob_s64_t, and cob_u64_t.
Referenced by display_common().
void cob_set_packed_int | ( | cob_field * | f, |
const int | val | ||
) |
Definition at line 1261 of file numeric.c.
References COB_FIELD_DIGITS, COB_FIELD_HAVE_SIGN, COB_FIELD_NO_SIGN_NIBBLE, cob_set_packed_zero(), cob_u32_t, cob_field::data, packed_bytes, and cob_field::size.
void cob_set_packed_zero | ( | cob_field * | f | ) |
Definition at line 1073 of file numeric.c.
References COB_FIELD_HAVE_SIGN, COB_FIELD_NO_SIGN_NIBBLE, cob_field::data, and cob_field::size.
Referenced by cob_decimal_get_packed(), and cob_set_packed_int().
Definition at line 1940 of file numeric.c.
References cob_decimal_get_field(), cob_decimal_set_field(), and cob_decimal_sub().
int cob_sub_int | ( | cob_field * | f, |
const int | n, | ||
const int | opt | ||
) |
Definition at line 2251 of file numeric.c.
References cob_add_int().
|
static |
Definition at line 229 of file numeric.c.
Referenced by cob_binary_get_sint64(), cob_binary_get_uint64(), cob_binary_set_int64(), and cob_binary_set_uint64().
|
static |
Definition at line 394 of file numeric.c.
References cob_mexp, cob_uli_t, cob_decimal::scale, and cob_decimal::value.
Referenced by align_decimal(), cob_decimal_div(), cob_decimal_do_round(), cob_decimal_get_field(), and cob_div_quotient().
|
static |
Definition at line 108 of file numeric.c.
Referenced by cob_decimal_get_field().
|
static |
|
static |
|
static |
|
static |
Definition at line 113 of file numeric.c.
Referenced by cob_exit_numeric(), and cob_init_numeric().
|
static |
Definition at line 115 of file numeric.c.
Referenced by cob_add_int(), cob_decimal_get_double(), cob_decimal_set_double(), cob_decimal_set_ieee128dec(), cob_decimal_set_ieee64dec(), cob_exit_numeric(), cob_init_numeric(), and shift_decimal().
|
static |
Definition at line 122 of file numeric.c.
Referenced by cob_decimal_get_double(), cob_decimal_set_double(), cob_exit_numeric(), and cob_init_numeric().
|
static |
Definition at line 123 of file numeric.c.
Referenced by cob_decimal_get_double(), cob_exit_numeric(), and cob_init_numeric().
|
static |
Definition at line 119 of file numeric.c.
Referenced by cob_decimal_get_ieee64dec(), cob_exit_numeric(), and cob_init_numeric().
|
static |
Definition at line 118 of file numeric.c.
Referenced by cob_decimal_get_ieee128dec(), cob_decimal_set_ieee128dec(), cob_exit_numeric(), and cob_init_numeric().
|
static |
Definition at line 120 of file numeric.c.
Referenced by cob_decimal_get_binary(), cob_decimal_get_ieee128dec(), cob_decimal_get_ieee64dec(), cob_exit_numeric(), and cob_init_numeric().
|
static |
Definition at line 116 of file numeric.c.
Referenced by cob_decimal_do_round(), cob_decimal_get_binary(), cob_exit_numeric(), and cob_init_numeric().
|
static |
Definition at line 117 of file numeric.c.
Referenced by cob_decimal_do_round(), cob_decimal_print(), cob_exit_numeric(), and cob_init_numeric().
|
static |
|
static |
Definition at line 126 of file numeric.c.
Referenced by cob_cmp_packed(), and cob_init_numeric().
|
static |
Definition at line 58 of file numeric.c.
Referenced by cob_set_packed_int().
|
static |
Definition at line 125 of file numeric.c.
Referenced by cob_cmp_packed(), and cob_init_numeric().