Skip to content

stp_number.dir@_utils.h

Andy Zhang edited this page Aug 7, 2026 · 2 revisions
+===================================================================
  File:      _UTILS.H

  Functions: _STP_Number_add - Add a 64-bit value to num.
             _STP_Number_add_abs - Add rhs to lhs without considering scales.
             _STP_Number_sub_abs - Subtracts rhs from lhs without considering scales.
             _STP_Number_cmp_abs - Compare absolute magnitude of rhs and lhs.
             _STP_Number_mul_exp - Quickly multiply num be an exponent of 10, i.e., 10^diff_scale.
             _STP_Number_align_scales - Align scales of lhs and rhs.
             _STP_Number_trim - Trims leading zero blocks from num.
             _STP_Number_slice - Copy a number of blocks from src to dst.
             _STP_Number_ensure_capacity - Ensure the number has capacity of at least min_capacity.

  Copyright (C) 2026 Andy Zhang, licensed under MIT License
===================================================================+

Clone this wiki locally