Live data from Hacker News

Picomath: self-contained math functions in 11 languages

picomath.org

11–20 of 20 posts

Re: Picomath: self-contained math functions in 11 languages

#12
post #4

I didn't check them all, but I got 403 and blank pages when trying to access the python and C++ files respectively.

Also 403 for Python. The other page are blank because they use which is not correct and should be but the code is here if you look at the source.

Thanks for noticing that! I've fixed the code and it should work now. (It was probably only a problem for IE, please let me know if it's still not fixed.)

Re: Picomath: self-contained math functions in 11 languages

#14
post #9

Pretty cool. The Ruby port is of questionable use, considering erf, gamma, etc. are already implemented in the Math module.

Newer versions of Python also contain implementations for gamma and erf. I implemented all functions in each language mostly for completeness, but I will add a note in the code snippet where the function is already provided by the language standard library.

Re: Picomath: self-contained math functions in 11 languages

#15
post #4

Earlier quoted context omitted.

Also 403 for Python. The other page are blank because they use which is not correct and should be but the code is here if you look at the source.

Thanks for noticing that! I've fixed the code and it should work now. (It was probably only a problem for IE, please let me know if it's still not fixed.)

It seems fixed but it was not a IE only problem, I'm using Firefox v5.

Re: Picomath: self-contained math functions in 11 languages

#18

I was just wondering, what would you use the gamma function for? I'm not that far enough in the mathematical field to know, so that's why i ask. Maybe a real world example? Thanks.

The gamma function shows up in a number of common probability distributions. For example, there is the gamma distribution, which is useful for modeling how long it will be until some random-ish thing happens: how long until some machine fails, how long until some extreme weather event happens. (Or something like that; I'm at the far borders of my field of expertise here.)
Post reply on HN