Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's news to me that "elementary functions" include roots of arbitrary polynomials, but the wiki article in fact says that they're included at least some of the time. I remember reading about the Risch algorithm (for finding closed form antiderivatives) a long time ago and elementary functions were just the ordinary ones found on calculators.

Interestingly, the abs (absolute value) function is non-elementary. I wonder if exp-minus-log can represent it.



EML can represent the real absolute value, so long as we agree with the original author's proviso that we define log(0) and exp(-∞), by way of sqrt(x^2) as f(x) = exp((1/2)log x). Traditionally, log(0) isn't defined, but the original author stipulated it to be -∞, and that all arithmetic works over the "extended reals", which makes

    abs(0)
    = f(0)            ; by defn
    = exp(1/2 log 0)  ; by defn
    = exp(-∞/2)       ; log 0 rule
    = exp(-∞)         ; extended real arith
    = 0               ; exp(-∞) rule
If we don't agree with this, then abs() could be defined with a hole punched out of the real line. The logarithm function isn't exactly elegant in this regard with its domain restrictions. :)


It's ok for elementary functions to have singularities, like 1/x at x=0. But I'm not sure what happens with your version of abs, since the log function has branches. log(1) is any of 0, 2*pi*i, 4*pi*i, etc.


abs(x) = sqrt(x*x), no?


I think the issue might be the branch cut in the sqrt function. Per the wiki article, elementary functions have to be differentiable in the complex plane at all but a finite number of points.


The origianl article use complex numbers, in particular to get sin and cos from eml:

> e^{iφ} = cosφ + i sin φ

So x may be a complex number and sqrt(x*x) is a complex number that sometimes is equal to x and sometimes to -x depending on how lucky you were selecting the branches of sqrt.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: