simon-git: spigot (master): Simon Tatham
Commits to Tartarus CVS repository.
tartarus-commits at lists.tartarus.org
Sat Dec 27 11:51:48 GMT 2014
TL;DR:
52364e0 Use spigot_algebraic as a special case in pow().
Repository: git://git.tartarus.org/simon/spigot.git
On the web: http://tartarus.org/~simon-git/gitweb/?p=spigot.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2014-12-27 11:51:48
commit 52364e08da65e517a2508d5ca9f80431b4c51ff7
web diff http://tartarus.org/~simon-git/gitweb/?p=spigot.git;a=commitdiff;h=52364e08da65e517a2508d5ca9f80431b4c51ff7;hp=8689b2bf89c6e02bff3db86da30bcbe37c034c76
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Dec 27 11:45:21 2014 +0000
Use spigot_algebraic as a special case in pow().
It's considerably faster to compute, say, 2^(7/12) by finding the
positive root of x^12 = 2^7 than by the fully general exp/log system.
We already had a special case for raising rationals to integer powers;
now that's extended to cover raising rationals to _rational_ powers.
I've limited the size of numerator and denominator in the power to
something fairly arbitrary. One of these days I should probably go
back and do the timing to decide what those figures _ought_ to be.
exp.cpp | 39 +++++++++++++++++++++++++----------
test.sh | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 98 insertions(+), 11 deletions(-)
More information about the tartarus-commits
mailing list