Oscar Smith
Oscar Smith
heavily inspired by @trizen, but refactored a little to make it more reliable.
87x faster for `prime(10^7)`. There are still much better ways of computing this functions, but this is a fairly simple, but massive improvement.
Use trial division and pohlard's P-1 algorithm to speed up `ismersenne` when false. Based roughly on https://www.mersenne.org/various/math.php. The basic idea is that since almost no mersenne numbers are prime, it's...
The current algorithm does up to `p` divisions, while this algorithm does only 1. I've assigned @quinnj to review since I'm not 100% sure that there isn't a very good...
Instead of using `sin_kernel` and `cos_kernel`, use better kernels that need less precision. I benchmark this as 14% faster for Float64, 7% faster for Float32. Accuracy for Float64 is .64...
Given bounds on x of -1e3 to 1e3, Herbie suggests replacing the expression with x^3/3! -x^5/5! + x^7/7!, despite the fact that in double precision, this formula only works for...
master: ``` julia> dump(:(function (f(::T) where {T}) end)) Expr head: Symbol function args: Array{Any}((2,)) 1: Expr head: Symbol where args: Array{Any}((2,)) 1: Expr head: Symbol call args: Array{Any}((2,)) 1: Symbol...
On Julia master: ``` julia> dump(:(@a[1])) Expr head: Symbol macrocall args: Array{Any}((3,)) 1: Symbol @a 2: LineNumberNode line: Int64 1 file: Symbol REPL[3] 3: Expr head: Symbol vect args: Array{Any}((1,))...
JuliaSyntax gives  While flisp gives ``` ERROR: syntax: invalid syntax "1.+"; add space(s) to clarify Stacktrace: [1] top-level scope @ none:1 ```
Experimental fix for https://github.com/JuliaCollections/AbstractTrees.jl/issues/117