forked from JuliaMath/DoubleFloats.jl
/
DoubleFloats.jl
141 lines (117 loc) · 4.17 KB
/
DoubleFloats.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
"""
DoubleFloats
A package for extended precision floating point math.
exported types: `Double64`, `Double32`, `Double16`
`ComplexDF64`, `ComplexDF32`, `ComplexDF16`
"""
module DoubleFloats
abstract type MultipartFloat <: AbstractFloat end
export DoubleFloat,
Double64, Double32, Double16,
ComplexDF64, ComplexDF32, ComplexDF16,
@df64_str, @df32_str, @df16_str,
@via_df64, @via_df32,
MultipartFloat, HI, LO, HILO,
stringtyped, showtyped, showall,
isnonzero, ispositive, isnegative, isnonpositive, isnonnegative,
isposinf, isneginf, isfractional, isnormal, issquare,
nan, inf, posinf, neginf,
ulp,
intpart, fracpart, fmod,
square, cube,
add2, sub2, mul2, div2,
⊕, ⊖, ⊗, ⊘,
spread, sld, tld,
signs,
randpm,
tanpi,
agm, agm1, ellipk,
besselj0, besselj1, besselj, bessely0, bessely1, bessely,
gamma, loggamma, lgamma, erf, erfc,
matrixfunction
using Base.MathConstants: pi, golden, ℯ, eulergamma, catalan
using Printf
using Random
import Random: rand, randn
using Polynomials
using GenericSVD, GenericSchur
using LinearAlgebra
import LinearAlgebra: norm, mul!
import Quadmath
import Base: hash, promote_type, promote_rule, convert,
string, show, parse, tryparse, eltype,
signbit, sign, abs, flipsign, copysign,
significand, exponent, precision, widen,
(+), (-), (*), (/), (\), (^), inv, sqrt, cbrt,
(==), (!=), (<), (<=), (>=), (>), isequal, isless,
IEEEFloat, iszero, isone, isinf, isnan, isinf, isfinite, issubnormal,
isinteger, isodd, iseven, zero, one,
typemax, typemin, floatmax, floatmin, maxintfloat,
min, max, minmax, minimum, maximum,
floor, ceil, trunc, round, div, fld, cld,
rem, mod, rem2pi, mod2pi, divrem, fldmod,
sqrt, cbrt,
BigFloat, BigInt,
Int8, Int16, Int32, Int64, Int128,
Float64, Float32, Float16
import Base.Math: modf, fma, muladd,
log, log1p, log2, log10, exp, expm1, exp2, exp10,
sin, cos, tan, csc, sec, cot, sincos, sinpi, cospi,
asin, acos, atan, acsc, asec, acot,
sinh, cosh, tanh, csch, sech, coth,
asinh, acosh, atanh, acsch, asech, acoth
import Quadmath: Float128
# for conditional SpecialFunctions
using Requires
include("Double.jl") # Double64, Double32, Double16
include("math/errorfree.jl")
include("math/leasterror.jl")
include("doubletriple/double.jl")
include("doubletriple/double_consts.jl")
include("doubletriple/triple.jl")
include("doubletriple/triple_consts.jl")
include("doubletriple/triple_pi.jl")
include("type/constructors.jl")
include("type/promote.jl")
include("type/convert.jl")
include("type/compare.jl")
include("type/predicates.jl")
include("type/specialvalues.jl")
include("type/string.jl")
include("type/show.jl")
include("type/parse.jl")
include("type/quadmath.jl")
include("math/prearith/prearith.jl")
include("math/prearith/floorceiltrunc.jl")
include("math/prearith/divrem.jl")
include("math/arithmetic/fma.jl")
include("math/arithmetic/modpi.jl")
include("math/arithmetic/normalize_hypot.jl")
include("math/arithmetic/mixedarith.jl")
include("math/arithmetic/complex/pow.jl")
include("math/ops.jl")
include("math/elementary/sequences.jl")
include("math/elementary/explog.jl")
include("math/elementary/trig.jl")
include("math/elementary/arctrig.jl")
include("math/elementary/hyptrig.jl")
include("math/elementary/archyptrig.jl")
include("math/elementary/templated.jl")
include("math/elementary/complex.jl")
include("math/linearalgebra/matmul.jl")
include("math/linearalgebra/support.jl")
include("math/linearalgebra/matrixfunction.jl")
if VERSION >= v"1.1.0"
using SpecialFunctions
include("math/special/specialfunctions.jl")
else
function __init__()
@require SpecialFunctions="276daf66-3868-5448-9aa4-cd146d93841b" begin
include("math/special/specialfunctions.jl")
end
end
end
include("extras/random.jl")
include("extras/misc.jl")
include("extras/macros.jl")
end # module DoubleFloats