Skip to content

Commit c9857f2

Browse files
Merge pull request #158 from nsajko/iszero
2 parents eb0723f + 25f7365 commit c9857f2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/doubletriple/tripleword.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ end
1212

1313

1414
function vecsum(x0::T,x1::T,x2::T) where {T}
15-
x0 === 0.0 && return (two_sum(x1, x2)..., 0.0)
15+
iszero(x0) && return (two_sum(x1, x2)..., 0.0)
1616
s1, e2 = two_sum(x1, x2)
1717
e0, e1 = two_sum(x0, s1)
1818
return (e0, e1, e2)
1919
end
2020

2121
function vseb(a0::T, a1::T, a2::T, a3::T, a4::T, a5::T) where {T}
22-
a2 === 0.0 && return (a0, a1, a2)
22+
iszero(a2) && return (a0, a1, a2)
2323
r0, e1 = two_sum(a0, a1)
2424
if e1 != 0.0
2525
y0 = r0
@@ -31,7 +31,7 @@ function vseb(a0::T, a1::T, a2::T, a3::T, a4::T, a5::T) where {T}
3131
end
3232

3333
function vseb(a0::T, a1::T, a2::T) where {T}
34-
a2 === 0.0 && return (a0, a1, a2)
34+
iszero(a2) && return (a0, a1, a2)
3535
r0, e1 = two_sum(a0, a1)
3636
if e1 != 0.0
3737
y0 = r0

src/type/string.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function string(x::DoubleFloat{T}) where {T<:IEEEFloat}
2-
(!isfinite(HI(x)) || LO(x) === 0.0) && return string(HI(x))
2+
(!isfinite(HI(x)) || iszero(LO(x))) && return string(HI(x))
33
str = string(Float128(x))
44
eat = findlast('e', str)
55
isnothing(eat) && return str

0 commit comments

Comments
 (0)