#include "bcdefs.h"#include "proto.h"Include dependency graph for number.c:

Go to the source code of this file.
Data Structures | |
| struct | stk_rec |
Functions | |
| void | free_num (bc_num *num) |
| bc_num | new_num (int length, int scale) |
| void | init_numbers () |
| bc_num | copy_num (bc_num num) |
| void | init_num (bc_num *num) |
| void | int2num (bc_num *num, int val) |
| long | num2long (bc_num num) |
| _PROTOTYPE (static int _do_compare,(bc_num n1, bc_num n2, int use_sign, int ignore_last)) | |
| _PROTOTYPE (static void _rm_leading_zeros,(bc_num num)) | |
| _PROTOTYPE (static bc_num _do_add,(bc_num n1, bc_num n2)) | |
| _PROTOTYPE (static void _one_mult,(unsigned char *num, int size, int digit, unsigned char *result)) | |
| static int | _do_compare (bc_num n1, bc_num n2, int use_sign, int ignore_last) |
| int | bc_compare (bc_num n1, bc_num n2) |
| char | is_zero (bc_num num) |
| char | is_neg (bc_num num) |
| static void | _rm_leading_zeros (bc_num num) |
| static bc_num | _do_add (bc_num n1, bc_num n2) |
| static bc_num | _do_sub (bc_num n1, bc_num n2) |
| void | bc_add (bc_num n1, bc_num n2, bc_num *result) |
| void | bc_sub (bc_num n1, bc_num n2, bc_num *result) |
| void | bc_multiply (bc_num n1, bc_num n2, bc_num *prod, int scale) |
| static void | _one_mult (unsigned char *num, int size, int digit, unsigned char *result) |
| int | bc_divide (bc_num n1, bc_num n2, bc_num *quot, int scale) |
| int | bc_modulo (bc_num num1, bc_num num2, bc_num *result, int scale) |
| void | bc_raise (bc_num num1, bc_num num2, bc_num *result, int scale) |
| int | bc_sqrt (bc_num *num, int scale) |
| void | out_long (long val, int size, int space, void(*out_char)()) |
| void | out_num (bc_num num, int o_base, void(*out_char)()) |
Variables | |
| bc_num | _zero_ |
| bc_num | _one_ |
| bc_num | _two_ |
| char | ref_str [] = "0123456789ABCDEF" |
|
||||||||||||
|
Definition at line 377 of file number.c. References _rm_leading_zeros(), carry(), MAX, new_num(), and sum(). |
|
||||||||||||||||||||
|
Definition at line 196 of file number.c. References count, MIN, and PLUS. Referenced by bc_add(), bc_compare(), bc_sqrt(), and bc_sub(). |
|
||||||||||||
|
Definition at line 458 of file number.c. |
|
||||||||||||||||||||
|
Definition at line 699 of file number.c. References carry(), memcpy(), memset(), and rptr. Referenced by bc_divide(). |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
Definition at line 351 of file number.c. References bytes. Referenced by _do_add(). |
|
||||||||||||||||
|
Definition at line 548 of file number.c. References _do_add(), _do_compare(), _do_sub(), _zero_, copy_num(), FALSE, free_num(), and sum(). Referenced by bc_sqrt(), execute(), incr_array(), incr_var(), and push_constant(). |
|
||||||||||||
|
Definition at line 303 of file number.c. References _do_compare(), FALSE, and TRUE. |
|
||||||||||||||||||||
|
Definition at line 739 of file number.c. References _one_mult(), carry(), count, extra(), FALSE, free_num(), int(), is_zero(), malloc(), memcpy(), memset(), MIN, MINUS, bc_struct::n_scale, bc_struct::n_sign, bc_struct::n_value, new_num(), NULL, out_of_memory(), PLUS, TRUE, val, and zero. Referenced by bc_modulo(), bc_raise(), bc_sqrt(), execute(), out_num(), and push_constant(). |
|
||||||||||||||||||||
|
Definition at line 933 of file number.c. References bc_divide(), bc_multiply(), bc_sub(), free_num(), init_num(), is_zero(), and MAX. |
|
||||||||||||||||||||
|
Definition at line 636 of file number.c. References indx(), MAX, MIN, MINUS, bc_struct::n_sign, bc_struct::n_value, new_num(), PLUS, and sum(). Referenced by bc_modulo(), bc_raise(), bc_sqrt(), execute(), out_num(), and push_constant(). |
|
||||||||||||||||||||
|
Definition at line 962 of file number.c. References _one_, bc_divide(), bc_multiply(), copy_num(), FALSE, free_num(), MAX, MIN, num2long(), rt_error(), rt_warn(), and TRUE. |
|
||||||||||||
|
Definition at line 1029 of file number.c. References _do_compare(), _one_, _zero_, bc_add(), bc_compare(), bc_divide(), bc_multiply(), bc_raise(), copy_num(), done, FALSE, free_num(), init_num(), int2num(), MAX, bc_struct::n_len, bc_struct::n_scale, bc_struct::n_value, new_num(), and TRUE. Referenced by execute(). |
|
||||||||||||||||
|
Definition at line 591 of file number.c. References _do_add(), _do_compare(), _do_sub(), _zero_, copy_num(), diff(), FALSE, free_num(), MINUS, and PLUS. Referenced by bc_modulo(), decr_array(), decr_var(), execute(), out_num(), and push_constant(). |
|
|
Definition at line 87 of file number.c. Referenced by assign(), bc_add(), bc_raise(), bc_sqrt(), bc_sub(), get_array_num(), init_num(), out_num(), push_constant(), push_copy(), store_array(), and store_var(). |
|
|
Definition at line 42 of file number.c. Referenced by assign(), bc_add(), bc_divide(), bc_modulo(), bc_raise(), bc_sqrt(), bc_sub(), free_a_tree(), int2num(), out_num(), pop(), pop_vars(), push_constant(), store_array(), and store_var(). |
|
|
Definition at line 98 of file number.c. References _zero_, and copy_num(). Referenced by auto_var(), bc_modulo(), bc_sqrt(), execute(), get_var(), out_num(), process_params(), push_b10_const(), push_constant(), and store_array(). |
|
|
Definition at line 74 of file number.c. References _one_, _two_, _zero_, bc_struct::n_value, and new_num(). Referenced by init_storage(). |
|
||||||||||||
|
Definition at line 108 of file number.c. References free_num(), MINUS, and new_num(). Referenced by bc_sqrt(), execute(), load_var(), out_num(), push_b10_const(), and push_constant(). |
|
|
Definition at line 339 of file number.c. References MINUS. Referenced by execute(), and store_var(). |
|
|
Definition at line 313 of file number.c. References _zero_, count, FALSE, and TRUE. Referenced by bc_divide(), bc_modulo(), decr_array(), execute(), incr_array(), load_array(), out_num(), store_array(), and store_var(). |
|
||||||||||||
|
Definition at line 55 of file number.c. References malloc(), bc_struct::n_len, bc_struct::n_refs, bc_struct::n_scale, bc_struct::n_sign, bc_struct::n_value, NULL, out_of_memory(), and PLUS. Referenced by _do_add(), _do_sub(), bc_divide(), bc_multiply(), bc_sqrt(), init_numbers(), int2num(), and push_b10_const(). |
|
|
Definition at line 155 of file number.c. References index(), LONG_MAX, PLUS, and val. Referenced by bc_raise(), decr_array(), incr_array(), load_array(), out_num(), process_params(), store_array(), and store_var(). |
|
||||||||||||||||||||
|
Definition at line 1124 of file number.c. References digits(), out_char(), sprintf(), and strlen(). Referenced by out_num(). |
|
||||||||||||||||
|
Definition at line 1152 of file number.c. References _one_, base, bc_divide(), bc_modulo(), bc_multiply(), bc_sub(), BCD_CHAR, copy_num(), stk_rec::digit, digits(), free, free_num(), index(), init_num(), int(), int2num(), is_zero(), malloc(), MINUS, bc_struct::n_len, bc_struct::n_scale, stk_rec::next, NULL, num2long(), out_char(), out_long(), and out_of_memory(). Referenced by execute(). |
|
|
Definition at line 34 of file number.c. Referenced by assign(), bc_raise(), bc_sqrt(), decr_array(), decr_var(), execute(), incr_array(), incr_var(), init_numbers(), out_num(), push_b10_const(), and push_constant(). |
|
|
Definition at line 35 of file number.c. Referenced by init_numbers(). |
|
|
Definition at line 33 of file number.c. Referenced by assign(), bc_add(), bc_sqrt(), bc_sub(), execute(), get_array_num(), init_num(), init_numbers(), is_zero(), load_var(), push_b10_const(), and push_constant(). |
|
|
|
1.4.6