Oscar Smith

Results 100 issues of Oscar Smith

heavily inspired by @trizen, but refactored a little to make it more reliable.

performance

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.

performance

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...

performance

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...

performance
maths

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...

parser

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,))...

bug
parser

JuliaSyntax gives ![image](https://user-images.githubusercontent.com/11729272/185699194-e148e444-99dd-409b-90d3-9ee3769bf2ac.png) While flisp gives ``` ERROR: syntax: invalid syntax "1.+"; add space(s) to clarify Stacktrace: [1] top-level scope @ none:1 ```

enhancement
tokenizer

Experimental fix for https://github.com/JuliaCollections/AbstractTrees.jl/issues/117