Once more, this is _exactly_ why Ada has arbitrary precision decimal arithmetic. One merely needs to specify type Result is range -100 .. 100 delta 0.0001; and the compiler will figure out how to give you fast math with only the accuracy and resolution that you need!
Chebyshev approximation and how it can help (2012)
11–20 of 20 posts
Re: Chebyshev approximation and how it can help (2012)
#12Some other useful things about Chebyshev approximations: 1. You can use a Fourier transform to get the coefficients in O(n log n) time. 2. So, multiplying two approximations only takes O(n log n) time. 3. Also, adding, integrating, or taking the derivative only take O(n) time. This is why chebfun/chebpy can run so fast while magically finding roots/derivatives/etc. A couple other interesting facts: 1. Remember the do…
Re: Chebyshev approximation and how it can help (2012)
#13Once more, this is _exactly_ why Ada has arbitrary precision decimal arithmetic. One merely needs to specify type Result is range -100 .. 100 delta 0.0001; and the compiler will figure out how to give you fast math with only the accuracy and resolution that you need!
How does that feature work without a solution to the tablemaker's dilemma? Does the compiler just give up and give you arbitrary precision every time you use transcendentals or does it give up and use lower precision if the estimate exceeds some arbitrary bound?
Re: Chebyshev approximation and how it can help (2012)
#14Once more, this is _exactly_ why Ada has arbitrary precision decimal arithmetic. One merely needs to specify type Result is range -100 .. 100 delta 0.0001; and the compiler will figure out how to give you fast math with only the accuracy and resolution that you need!
my experience outside of ada is that decimal arithmetic is never fast on binary computers
Re: Chebyshev approximation and how it can help (2012)
#15[1]: https://en.wikipedia.org/wiki/Remez_algorithm
[2] : https://www.sollya.org/
Re: Chebyshev approximation and how it can help (2012)
#16Once more, this is _exactly_ why Ada has arbitrary precision decimal arithmetic. One merely needs to specify type Result is range -100 .. 100 delta 0.0001; and the compiler will figure out how to give you fast math with only the accuracy and resolution that you need!
have you tested this? how fast and accurate were the results? or are you simply assuming that all compilers are perfect? my experience outside of ada is that decimal arithmetic is never fast on binary computers
Re: Chebyshev approximation and how it can help (2012)
#17Some other useful things about Chebyshev approximations: 1. You can use a Fourier transform to get the coefficients in O(n log n) time. 2. So, multiplying two approximations only takes O(n log n) time. 3. Also, adding, integrating, or taking the derivative only take O(n) time. This is why chebfun/chebpy can run so fast while magically finding roots/derivatives/etc. A couple other interesting facts: 1. Remember the do…
I’m gonna give this to my gpt system prompt as an example of how I want everything explained :)
Re: Chebyshev approximation and how it can help (2012)
#18I wrote that code (to compute sqrt 2) in 1974 or 1975 in IBM 360 Assembler. I used a conditional macro constant that increased the number of iterations of Newton's from 2 to 3 just in case the client wanted double precision.
Re: Chebyshev approximation and how it can help (2012)
#19As Boyd says in his book on Chebyshev Methods: when in doubt use Chebyshev polynomials. I use Chebyshev polynomials extensively in finance and have tried problems like MNIST with Chebyshev and they get close to CNNs in accuracy. ApproxFun Julia package pretty cool for Chebyshev work: https://juliaapproximation.github.io/ApproxFun.jl/latest/
What is your architecture? Is it just a fully connected layer of chebyshev?