[metamath] Plans for compile time double

Hi, I was wonder what the plans are for the compile time double library, metamath. Is there a plan to develop compile time versions of the functions in math.h, such as sin, cos, pow, abs, etc.? Thanks, Chris

On 8/26/05, Chris Weed <chrisweed@gmail.com> wrote:
Hi, I was wonder what the plans are for the compile time double library, metamath. Is there a plan to develop compile time versions of the functions in math.h, such as sin, cos, pow, abs, etc.? Thanks, Chris
That was the plan, yes. An implementation of some math functions already exists under http://boost-sandbox.sourceforge.net/vault/ <expaler/mpl_math.zip> I have modified the sine function to work with the compile time double library, but the main problem has been lack of time. I will try to find time to implement more math metafunctions, but help is welcome. Attached are implementations of sine and power (only integral exponents supported for now) Regards, Peder
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On 8/27/05, Peder Holt <peder.holt@gmail.com> wrote:
On 8/26/05, Chris Weed <chrisweed@gmail.com> wrote:
Hi, I was wonder what the plans are for the compile time double library, metamath. Is there a plan to develop compile time versions of the functions in math.h, such as sin, cos, pow, abs, etc.? Thanks, Chris
That was the plan, yes. An implementation of some math functions already exists under http://boost-sandbox.sourceforge.net/vault/ <expaler/mpl_math.zip> I have modified the sine function to work with the compile time double library, but the main problem has been lack of time. I will try to find time to implement more math metafunctions, but help is welcome.
Attached are implementations of sine and power (only integral exponents supported for now)
Regards, Peder
Hi, I would like to help out with this. Was the plan to implement most of the trigonometric functions with taylor expansions or some other algorithm? Chris

--- Chris Weed wrote:
Hi, I would like to help out with this. Was the plan to implement most of the trigonometric functions with taylor expansions or some other algorithm? Chris
The plan was to implement the primary templates (sine_impl::apply, etc.) using Taylor expansions, then let the tag-dependent specializations apply their own algorithms if need be. If you know what that other algorithm is, feel free to apply it to boost::metamath::double_. Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

On 8/30/05, Cromwell Enage <sponage@yahoo.com> wrote:
--- Chris Weed wrote:
Hi, I would like to help out with this. Was the plan to implement most of the trigonometric functions with taylor expansions or some other algorithm? Chris
The plan was to implement the primary templates (sine_impl::apply, etc.) using Taylor expansions, then let the tag-dependent specializations apply their own algorithms if need be. If you know what that other algorithm is, feel free to apply it to boost::metamath::double_.
It is basically the same algorithm, but since the basic operations on double_ (times,plus,minus,divides) are designed to yield the same result as for the runtime equivalent, we need to use times_double_double etc, which uses a 61 bit mantissa, and then truncate (round) to a 52 bit mantissa. I guess we need to implement sine_double, cosine_double etc in order to give the user a chance to exploit the entire 61 bit mantissa. Regards, Peder
Cromwell D. Enage
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On 8/30/05, Chris Weed <chrisweed@gmail.com> wrote:
On 8/27/05, Peder Holt <peder.holt@gmail.com> wrote:
On 8/26/05, Chris Weed <chrisweed@gmail.com> wrote:
Hi, I was wonder what the plans are for the compile time double library, metamath. Is there a plan to develop compile time versions of the functions in math.h, such as sin, cos, pow, abs, etc.? Thanks, Chris
That was the plan, yes. An implementation of some math functions already exists under http://boost-sandbox.sourceforge.net/vault/ <expaler/mpl_math.zip> I have modified the sine function to work with the compile time double library, but the main problem has been lack of time. I will try to find time to implement more math metafunctions, but help is welcome.
Attached are implementations of sine and power (only integral exponents supported for now)
Regards, Peder
Hi, I would like to help out with this. Was the plan to implement most of the trigonometric functions with taylor expansions or some other algorithm?
Great! Thanks. I'll upload the source to the sandbox cvs. Cromwell has implemented cosine,sine and sqare root. I have rewritten his sine implementation to use the _double_double meta-operators. The idea is to use taylor expansions, but wherever there is another series that converge faster, this should of course be used. E.g. The only expansion I have found of pow(x,y) where x and y are floating point numbers, requires one to calculate the series of ln(x) and then exp(ln(x)*y). This is very costly. Regards, Peder
Chris
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On 8/31/05, Peder Holt <peder.holt@gmail.com> wrote:
On 8/30/05, Chris Weed <chrisweed@gmail.com> wrote:
On 8/27/05, Peder Holt <peder.holt@gmail.com> wrote:
On 8/26/05, Chris Weed <chrisweed@gmail.com> wrote:
Hi, I was wonder what the plans are for the compile time double library, metamath. Is there a plan to develop compile time versions of the functions in math.h, such as sin, cos, pow, abs, etc.? Thanks, Chris
That was the plan, yes. An implementation of some math functions already exists under http://boost-sandbox.sourceforge.net/vault/ <expaler/mpl_math.zip> I have modified the sine function to work with the compile time double library, but the main problem has been lack of time. I will try to find time to implement more math metafunctions, but help is welcome.
Attached are implementations of sine and power (only integral exponents supported for now)
Regards, Peder
Hi, I would like to help out with this. Was the plan to implement most of the trigonometric functions with taylor expansions or some other algorithm?
Great! Thanks. I'll upload the source to the sandbox cvs.
Cromwell has implemented cosine,sine and sqare root. I have rewritten his sine implementation to use the _double_double meta-operators.
The idea is to use taylor expansions, but wherever there is another series that converge faster, this should of course be used. E.g. The only expansion I have found of pow(x,y) where x and y are floating point numbers, requires one to calculate the series of ln(x) and then exp(ln(x)*y). This is very costly.
Regards, Peder
The sandbox seems to be hosed. Chris

On 9/2/05, Chris Weed <chrisweed@gmail.com> wrote: <snip>
The sandbox seems to be hosed. Chris
I have uploaded the source to the sandbox cvs: http://www.boost.org/more/mailing_lists.htm#sandbox I will also upload a new .zip-file to the vault shortly. Regards Peder.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (3)
-
Chris Weed
-
Cromwell Enage
-
Peder Holt