Skip to content

Commit

Permalink
signbit
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsignorelli committed Jan 8, 2025
1 parent 29871b6 commit c98bce4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/man/n_all.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ acos, atan, acsc, asec, acot, asinh, acosh, atanh, acsch, asech,
acoth, zero, zeros, one, ones, real, imag, conj, angle, complex,
promote_rule, getindex, setindex!, ==, <, >, <=, >=, !=, isequal,
isless, isinf, isnan, show, copy!, lastindex, firstindex, rand,
unsafe_convert, eps, floatmin, floatmax
unsafe_convert, eps, floatmin, floatmax, signbit
```

`zeros` and `ones` are overloaded from Base so that allocated `TPS`s are placed in each element. Because of the mutability of `TPS`, if we didn't explicity overload these functions every element would correspond to the exact same heap-allocated TPS.
Expand Down
1 change: 1 addition & 0 deletions src/GTPSA.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ import Base: +,
eps,
floatmin,
floatmax,
signbit,
delete!

import LinearAlgebra: norm, mul!, copy_oftype, copymutable_oftype
Expand Down
1 change: 1 addition & 0 deletions src/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ isnan(t1::TPS) = isnan(geti(t1, 0))
eps(t1::TPS) = eps(numtype(t1))
floatmin(t1::TPS) = floatmin(numtype(t1))
floatmax(t1::TPS) = floatmax(numtype(t1))
signbit(t1::TPS) = signbit(geti(t1, 0))

# --- Compare entire TPS (monomial-by-monomial) ---
isequal(t1::TPS{Float64}, t2::TPS{Float64}) = equ(t1, t2, 0)
Expand Down

0 comments on commit c98bce4

Please sign in to comment.