A first order series is exactly equivalent to Dual numbers, at least
algebraically.

Functions of a first order series as defined here might be a little less
efficient because the composition rules are written in a more general way
so that they work for higher order series, but they're both pretty
efficient.


On Sun, Jan 19, 2014 at 5:51 AM, Stefan Karpinski <[email protected]>wrote:

> Very cool. It feel like a bit of a shame that Dual isn't just a the first
> order instance of PowerSeries, but I think for now that's probably for the
> best. But maybe down the line some time in future they could be merged? Or
> are there fundamental differences that make that impractical?
>
>
> On Sat, Jan 18, 2014 at 3:42 PM, John Myles White <
> [email protected]> wrote:
>
>> This is so cool, Jason. Really excited to try this out.
>>
>>  — John
>>
>> P.S. Sorry for missing your talk the other. Had to take a job candidate
>> out for dinner.
>>
>> On Jan 18, 2014, at 12:28 PM, Jason Merrill <[email protected]> wrote:
>>
>> > I'd like to announce the first public release of PowerSeries.jl [1], a
>> package for computing with truncated power series. In PowerSeries, Series
>> behave just like numbers, and you can do arithmetic on them and compute
>> functions of them just as you would a Real or Complex number. Integration
>> and differentiation are also supported.
>> >
>> > [1] https://github.com/jwmerrill/PowerSeries.jl
>> >
>> > Truncated power series over floating point numbers have the nice
>> property that the result of a long series of computations can be stored in
>> the same amount of space as the input to the computation. This is in
>> contrast with, e.g., Rational numbers, where the numerator and denominator
>> typically grow exponentially as you compute with them, or non-truncated
>> power series, where the number of terms grows linearly under
>> multiplication, and (typically) infinitely under division.
>> >
>> > I intend for PowerSeries series to be a practical computation tool with
>> very little overhead compared to code you might hand-write for a specific
>> problem. This goal may not be completely realized yet--issues and pull
>> requests welcome!
>> >
>> > One of my motivations for creating PowerSeries.jl was to extend
>> automatic differentiation to higher order derivatives. You can implement
>> forward-mode AD by overloading functions to operate on dual numbers [2],
>> which are numbers of the form
>> >
>> >   a + b*eps | eps^2 = 0
>> >
>> > Truncated power series can be viewed as a natural extension of Dual
>> numbers to numbers the form
>> >
>> >   a + b*eps + c*eps^2 + d*eps^3 + ... | eps^n = 0 for some n
>> >
>> > that allow computing higher order derivatives. See the README for
>> details.
>> >
>> > [2] see DualNumbers.jl, https://github.com/scidom/DualNumbers.jl
>>
>>
>

Reply via email to