waldyrious / IrrationalConstantRules.jl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IrrationalConstantRules

This package overwrites the return values for Irrationals defined in IrrationalConstatns.jl.

julia> using IrrationalConstants

julia> sin(quartπ)
0.7071067811865476

julia> sin(twoπ)
0.0

julia> using IrrationalConstantRules

julia> sin(quartπ)
invsqrt2 = 0.7071067811865...

julia> sin(twoπ)
false

Please read the long discussion about this on JuliaMath/IrrationalConstants.jl#14. I still feel sin(::Irrational) isa Irrational can be reasonable.

Installation

(@v1.7) pkg> add https://github.com/hyrodium/IrrationalConstantRules.jl

About

License:MIT License


Languages

Language:Julia 100.0%