#include "stdlib.h"#include "string.h"#include "errno.h"#include "float.h"#include "math.h"構成 | |
| union | U |
| struct | Bigint |
マクロ定義 | |
| #define | Long long |
| #define | MALLOC malloc |
| #define | PRIVATE_MEM 2304 |
| #define | PRIVATE_mem ((PRIVATE_MEM+sizeof(double)-1)/sizeof(double)) |
| #define | CONST const |
| #define | word0(x) ((U*)&x)->L[0] |
| #define | word1(x) ((U*)&x)->L[1] |
| #define | dval(x) ((U*)&x)->d |
| #define | Storeinc(a, b, c) |
| #define | Exp_shift 20 |
| #define | Exp_shift1 20 |
| #define | Exp_msk1 0x100000 |
| #define | Exp_msk11 0x100000 |
| #define | Exp_mask 0x7ff00000 |
| #define | P 53 |
| #define | Bias 1023 |
| #define | Emin (-1022) |
| #define | Exp_1 0x3ff00000 |
| #define | Exp_11 0x3ff00000 |
| #define | Ebits 11 |
| #define | Frac_mask 0xfffff |
| #define | Frac_mask1 0xfffff |
| #define | Ten_pmax 22 |
| #define | Bletch 0x10 |
| #define | Bndry_mask 0xfffff |
| #define | Bndry_mask1 0xfffff |
| #define | LSB 1 |
| #define | Sign_bit 0x80000000 |
| #define | Log2P 1 |
| #define | Tiny0 0 |
| #define | Tiny1 1 |
| #define | Quick_max 14 |
| #define | Int_max 14 |
| #define | Avoid_Underflow |
| #define | Flt_Rounds 1 |
| #define | Rounding Flt_Rounds |
| #define | rounded_product(a, b) a *= b |
| #define | rounded_quotient(a, b) a /= b |
| #define | Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1)) |
| #define | Big1 0xffffffff |
| #define | Pack_32 |
| #define | FFFFFFFF 0xffffffffUL |
| #define | Llong long long |
| #define | ULLong unsigned Llong |
| #define | ACQUIRE_DTOA_LOCK(n) |
| #define | FREE_DTOA_LOCK(n) |
| #define | Kmax 15 |
| #define | Bcopy(x, y) |
| #define | d0 word0(d) |
| #define | d1 word1(d) |
| #define | d0 word0(d) |
| #define | d1 word1(d) |
| #define | Scale_Bit 0x10 |
| #define | n_bigtens 5 |
型定義 | |
| typedef unsigned Long | ULong |
| typedef struct Bigint | Bigint |
関数 | |
| static Bigint * | Balloc (int k) |
| static void | Bfree (Bigint *v) |
| static Bigint * | multadd (Bigint *b, int m, int a) |
| static Bigint * | s2b (CONST char *s, int nd0, int nd, ULong y9) |
| static int | hi0bits (register ULong x) |
| static int | lo0bits (ULong *y) |
| static Bigint * | i2b (int i) |
| static Bigint * | mult (Bigint *a, Bigint *b) |
| static Bigint * | pow5mult (Bigint *b, int k) |
| static Bigint * | lshift (Bigint *b, int k) |
| static int | cmp (Bigint *a, Bigint *b) |
| static Bigint * | diff (Bigint *a, Bigint *b) |
| static double | ulp (double x) |
| static double | b2d (Bigint *a, int *e) |
| static Bigint * | d2b (double d, int *e, int *bits) |
| static double | ratio (Bigint *a, Bigint *b) |
| double | strtod (CONST char *s00, char **se) |
| static int | quorem (Bigint *b, Bigint *S) |
| static char * | rv_alloc (int i) |
| static char * | nrv_alloc (const char *s, char **rve, int n) |
| void | freedtoa (char *s) |
| char * | dtoa (double d, int mode, int ndigits, int *decpt, int *sign, char **rve) |
変数 | |
| static double | private_mem [PRIVATE_mem] |
| static double * | pmem_next = private_mem |
| Exactly one of | IEEE_8087 |
| Exactly one of | IEEE_MC68k |
| Exactly one of | VAX |
| static Bigint * | freelist [Kmax+1] |
| static Bigint * | p5s |
| static CONST double | tens [] |
| static CONST double | bigtens [] = { 1e16, 1e32, 1e64, 1e128, 1e256 } |
| static CONST double | tinytens [] |
| static char * | dtoa_result |
| #define ACQUIRE_DTOA_LOCK | ( | n | ) |
参照元 Balloc(), Bfree(), と pow5mult().
| #define Bcopy | ( | x, | ||
| y | ||||
| ) |
| #define CONST const |
| #define d0 word0(d) |
| #define d0 word0(d) |
| #define d1 word1(d) |
| #define d1 word1(d) |
| #define dval | ( | x | ) | ((U*)&x)->d |
| #define FREE_DTOA_LOCK | ( | n | ) |
参照元 Balloc(), Bfree(), と pow5mult().
| #define PRIVATE_mem ((PRIVATE_MEM+sizeof(double)-1)/sizeof(double)) |
| #define Storeinc | ( | a, | ||
| b, | ||||
| c | ||||
| ) |
| #define word0 | ( | x | ) | ((U*)&x)->L[0] |
| #define word1 | ( | x | ) | ((U*)&x)->L[1] |
| static double b2d | ( | Bigint * | a, | |
| int * | e | |||
| ) | [static] |
| static Bigint* Balloc | ( | int | k | ) | [static] |
参照先 ACQUIRE_DTOA_LOCK, FREE_DTOA_LOCK, Bigint::k, MALLOC, Bigint::maxwds, Bigint::next, pmem_next, PRIVATE_mem, private_mem, Bigint::sign, Bigint::wds, と Bigint::x.
参照元 d2b(), diff(), dtoa(), i2b(), lshift(), mult(), multadd(), rv_alloc(), s2b(), と strtod().
| static void Bfree | ( | Bigint * | v | ) | [static] |
参照先 ACQUIRE_DTOA_LOCK, と FREE_DTOA_LOCK.
参照元 dtoa(), freedtoa(), lshift(), multadd(), pow5mult(), と strtod().
参照先 Bigint::wds, と Bigint::x.
参照元 v8::internal::FloatingPointHelper::AllocateHeapNumber(), v8::internal::FloatingPointHelper::CheckFloatOperands(), v8::internal::CodeGenerator::Comparison(), v8::internal::CallStubCompiler::CompileCallConstant(), v8::internal::CallStubCompiler::CompileCallField(), v8::internal::StoreStubCompiler::CompileStoreCallback(), v8::internal::StoreStubCompiler::CompileStoreField(), v8::internal::StoreStubCompiler::CompileStoreInterceptor(), diff(), dtoa(), v8::internal::CodeGenerator::EnterJSFrame(), v8::internal::CodeGenerator::GenCode(), v8::internal::CallIC::Generate(), v8::internal::InstanceofStub::Generate(), v8::internal::CompareStub::Generate(), v8::internal::ToBooleanStub::Generate(), v8::internal::SmiComparisonDeferred::Generate(), v8::internal::CallFunctionStub::Generate(), v8::internal::UnarySubStub::Generate(), v8::internal::StackCheckStub::Generate(), v8::internal::GenericBinaryOpStub::Generate(), v8::internal::SetPropertyStub::Generate(), v8::internal::GetPropertyStub::Generate(), v8::internal::LoadIC::GenerateArrayLength(), v8::internal::CEntryStub::GenerateCore(), v8::internal::GenerateDictionaryLoad(), v8::internal::CodeGenerator::GenerateFastCaseSwitchJumpTable(), v8::internal::CodeGenerator::GenerateIsArray(), v8::internal::CallIC::GenerateMegamorphic(), v8::internal::ArgumentsAccessStub::GenerateNewObject(), v8::internal::LoadIC::GenerateNormal(), v8::internal::CallIC::GenerateNormal(), v8::internal::GenerateNormalHelper(), v8::internal::CodeGenerator::GenerateObjectEquals(), v8::internal::ArgumentsAccessStub::GenerateReadElement(), v8::internal::ArgumentsAccessStub::GenerateReadLength(), v8::internal::CodeGenerator::GenerateSetValueOf(), v8::internal::GenericBinaryOpStub::GenerateSmiCode(), v8::internal::GenerateStringCheck(), v8::internal::LoadIC::GenerateStringLength(), v8::internal::CEntryStub::GenerateThrowOutOfMemory(), v8::internal::CEntryStub::GenerateThrowTOS(), v8::internal::CodeGenerator::GenerateValueOf(), v8::internal::CodeGenerator::LoadFromSlot(), v8::internal::Parser::ParseBinaryExpression(), v8::internal::ProbeTable(), quorem(), v8::internal::CodeGenerator::SmiComparison(), v8::internal::List< T, P >::Sort(), strtod(), と v8::internal::CodeGenerator::ToBoolean().
| static Bigint* d2b | ( | double | d, | |
| int * | e, | |||
| int * | bits | |||
| ) | [static] |
参照先 Balloc(), cmp(), Bigint::k, Bigint::sign, Storeinc, ULLong, Bigint::wds, と Bigint::x.
参照元 dtoa(), v8::internal::Runtime_SmiLexicographicCompare(), と strtod().
| char* dtoa | ( | double | d, | |
| int | mode, | |||
| int | ndigits, | |||
| int * | decpt, | |||
| int * | sign, | |||
| char ** | rve | |||
| ) |
参照先 Balloc(), Bcopy, Bfree(), Bias, bigtens, Bletch, Bndry_mask, cmp(), d2b(), diff(), dval, Exp_1, Exp_mask, Exp_msk1, Exp_shift1, Flt_Rounds, Frac_mask, freedtoa(), hi0bits(), i2b(), Int_max, Bigint::k, Log2P, Long, lshift(), mult(), multadd(), n_bigtens, nrv_alloc(), P, pow5mult(), Quick_max, quorem(), Rounding, rv_alloc(), Bigint::sign, Sign_bit, Ten_pmax, tens, Bigint::wds, word0, word1, と Bigint::x.
| void freedtoa | ( | char * | s | ) |
| static int hi0bits | ( | register ULong | x | ) | [static] |
| static Bigint* i2b | ( | int | i | ) | [static] |
参照先 Balloc(), Bigint::wds, と Bigint::x.
参照元 dtoa(), pow5mult(), と strtod().
| static int lo0bits | ( | ULong * | y | ) | [static] |
参照先 Balloc(), Bfree(), Bigint::k, Bigint::maxwds, Bigint::wds, と Bigint::x.
参照先 Balloc(), Bigint::k, Bigint::maxwds, Storeinc, ULLong, Bigint::wds, と Bigint::x.
参照元 dtoa(), pow5mult(), と strtod().
参照先 Balloc(), Bcopy, Bfree(), Bigint::k, Bigint::maxwds, ULLong, Bigint::wds, と Bigint::x.
参照元 dtoa(), pow5mult(), と s2b().
| static char* nrv_alloc | ( | const char * | s, | |
| char ** | rve, | |||
| int | n | |||
| ) | [static] |
参照先 ACQUIRE_DTOA_LOCK, Bfree(), FREE_DTOA_LOCK, i2b(), mult(), multadd(), と Bigint::next.
参照先 cmp(), v8::internal::S, Storeinc, ULLong, Bigint::wds, と Bigint::x.
参照元 dtoa().
| static char* rv_alloc | ( | int | i | ) | [static] |
| double strtod | ( | CONST char * | s00, | |
| char ** | se | |||
| ) |
参照先 Avoid_Underflow, Balloc(), Bcopy, Bfree(), Bias, Big0, Big1, bigtens, Bndry_mask, Bndry_mask1, cmp(), CONST, d2b(), diff(), dval, Emin, Exp_1, Exp_mask, Exp_msk1, Exp_shift, Flt_Rounds, Frac_mask, i2b(), Bigint::k, Log2P, Long, LSB, lshift(), match(), mult(), n_bigtens, P, pow5mult(), ratio(), rounded_product, rounded_quotient, Rounding, s2b(), Scale_Bit, Bigint::sign, Ten_pmax, tens, Tiny0, Tiny1, ulp(), Bigint::wds, word0, word1, と Bigint::x.
| static double ulp | ( | double | x | ) | [static] |
CONST double bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 } [static] |
char* dtoa_result [static] |
| Exactly one of IEEE_MC68k |
double * pmem_next = private_mem [static] |
double private_mem[PRIVATE_mem] [static] |
CONST double tens[] [static] |
CONST double tinytens[] [static] |
1.7.1