v2 / vlib / math / internal / machine.v
56 lines · 55 sloc · 2.59 KB · f09826e928f9612bab9299faefff7cf34a503362
Raw
1module internal
2
3// contants to do fine tuning of precision for the functions
4// implemented in pure V
5pub const f64_epsilon = 2.2204460492503131e-16
6pub const sqrt_f64_epsilon = 1.4901161193847656e-08
7pub const root3_f64_epsilon = 6.0554544523933429e-06
8pub const root4_f64_epsilon = 1.2207031250000000e-04
9pub const root5_f64_epsilon = 7.4009597974140505e-04
10pub const root6_f64_epsilon = 2.4607833005759251e-03
11pub const log_f64_epsilon = -3.6043653389117154e+01
12pub const f64_min = 2.2250738585072014e-308
13pub const sqrt_f64_min = 1.4916681462400413e-154
14pub const root3_f64_min = 2.8126442852362996e-103
15pub const root4_f64_min = 1.2213386697554620e-77
16pub const root5_f64_min = 2.9476022969691763e-62
17pub const root6_f64_min = 5.3034368905798218e-52
18pub const log_f64_min = -7.0839641853226408e+02
19pub const f64_max = 1.7976931348623157e+308
20pub const sqrt_f64_max = 1.3407807929942596e+154
21pub const root3_f64_max = 5.6438030941222897e+102
22pub const root4_f64_max = 1.1579208923731620e+77
23pub const root5_f64_max = 4.4765466227572707e+61
24pub const root6_f64_max = 2.3756689782295612e+51
25pub const log_f64_max = 7.0978271289338397e+02
26pub const f32_epsilon = 1.1920928955078125e-07
27pub const sqrt_f32_epsilon = 3.4526698300124393e-04
28pub const root3_f32_epsilon = 4.9215666011518501e-03
29pub const root4_f32_epsilon = 1.8581361171917516e-02
30pub const root5_f32_epsilon = 4.1234622211652937e-02
31pub const root6_f32_epsilon = 7.0153878019335827e-02
32pub const log_f32_epsilon = -1.5942385152878742e+01
33pub const f32_min = 1.1754943508222875e-38
34pub const sqrt_f32_min = 1.0842021724855044e-19
35pub const root3_f32_min = 2.2737367544323241e-13
36pub const root4_f32_min = 3.2927225399135965e-10
37pub const root5_f32_min = 2.5944428542140822e-08
38pub const root6_f32_min = 4.7683715820312542e-07
39pub const log_f32_min = -8.7336544750553102e+01
40pub const f32_max = 3.4028234663852886e+38
41pub const sqrt_f32_max = 1.8446743523953730e+19
42pub const root3_f32_max = 6.9814635196223242e+12
43pub const root4_f32_max = 4.2949672319999986e+09
44pub const root5_f32_max = 5.0859007855960041e+07
45pub const root6_f32_max = 2.6422459233807749e+06
46pub const log_f32_max = 8.8722839052068352e+01
47pub const sflt_epsilon = 4.8828125000000000e-04
48pub const sqrt_sflt_epsilon = 2.2097086912079612e-02
49pub const root3_sflt_epsilon = 7.8745065618429588e-02
50pub const root4_sflt_epsilon = 1.4865088937534013e-01
51pub const root5_sflt_epsilon = 2.1763764082403100e-01
52pub const root6_sflt_epsilon = 2.8061551207734325e-01
53pub const log_sflt_epsilon = -7.6246189861593985e+00
54pub const max_int_fact_arg = 170
55pub const max_f64_fact_arg = 171.0
56pub const max_long_f64_fact_arg = 1755.5
57