File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,11 @@ function calc_exp(a::DoubleFloat{T}) where {T<:IEEEFloat}
179
179
return z
180
180
end
181
181
182
+ #=
183
+ this is inaccurate for e.g. x=1.0e-16
184
+ the fix is to redesign it completely
185
+ for the meanwhile -- we replace it
186
+
182
187
function expm1(a::DoubleFloat{T}) where {T<:IEEEFloat}
183
188
isnan(a) && return a
184
189
isinf(a) && return(signbit(a) ? zero(DoubleFloat{T}) : a)
@@ -192,6 +197,12 @@ function expm1(a::DoubleFloat{T}) where {T<:IEEEFloat}
192
197
a*(u-1.0) / log(u)
193
198
end
194
199
end
200
+ =#
201
+
202
+ function expm1 (a:: DoubleFloat{T} ) where {T<: IEEEFloat }
203
+ y = expm1 ( Float128 (a) )
204
+ DoubleFloat {T} (y)
205
+ end
195
206
196
207
function exp2 (a:: DoubleFloat{T} ) where {T<: IEEEFloat }
197
208
isnan (a) && return a
You can’t perform that action at this time.
0 commit comments