JuliaStats / Distributions.jl

A Julia package for probability distributions and associated functions.
Other
1.1k stars 414 forks source link

Error in Distributions/src/constants.jl #229

Closed goedman closed 10 years ago

goedman commented 10 years ago

Popped up about an hour or so ago after I fetched prerelease+3077, didn't see it in prerelease+3072.

           _

() | A fresh approach to technical computing () | () () | Documentation: http://docs.julialang.org | | | Type "help()" to list help topics | | | | | | |/ ` | | | | || | | | (| | | Version 0.3.0-prerelease+3079 (2014-05-10 20:58 UTC) / |_'||_|'_| | master/6977ffd* (fork: 593 commits, 36 days) |__/ | x86_64-apple-darwin13.2.0

julia> include("/Users/rob/.julia/v0.3/MCMC/test/test_ARS.jl") ERROR: syntax: expected identifier after "const" in include at boot.jl:244 (repeats 2 times) in reload_path at loading.jl:152 in _require at loading.jl:67 in require at loading.jl:51 in include at boot.jl:244 while loading /Users/rob/.julia/v0.3/Distributions/src/constants.jl, in expression starting on line 6 while loading /Users/rob/.julia/v0.3/Distributions/src/Distributions.jl, in expression starting on line 223 while loading /Users/rob/.julia/v0.3/MCMC/test/test_ARS.jl, in expression starting on line 1

julia>

Useful math constants for distributions

import Base.@math_const

@math_const twoπ 6.2831853071795864769 big(2.) * π @math_const √2 1.4142135623730950488 sqrt(big(2.)) @math_const log2π 1.8378770664093454836 log(big(2.)_π) @math_const √2π 2.5066282746310005024 sqrt(big(2.)_π) @math_const logtwo 0.6931471805599453094 log(big(2.)) @math_const loghalf -0.6931471805599453094 log(big(0.5))

simonbyrne commented 10 years ago

Ah yes, this is due to now being an operator, I'll push a fix soon.

simonbyrne commented 10 years ago

Closed by 244c27c025df48a8c64c3a79f0eaba6e818ae82e

I've pushed a new release, so this should be fixed by a Pkg.update().

goedman commented 10 years ago

Fixed! Life in the fast lane.

And these are in fact 2 quite handy constants.

Rob J. Goedman goedman@icloud.com

On May 10, 2014, at 3:45 PM, Simon Byrne notifications@github.com wrote:

Closed #229.

— Reply to this email directly or view it on GitHub.