f package:ad
The
findZero function finds a zero of a scalar function using
Halley's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.) If the stream becomes constant
("it converges"), no further elements are returned.
Examples:
>>> take 10 $ findZero (\x->x^2-4) 1
[1.0,1.8571428571428572,1.9997967892704736,1.9999999999994755,2.0]
The
fixedPoint function find a fixedpoint of a scalar function
using Halley's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.)
If the stream becomes constant ("it converges"), no further elements
are returned.
>>> last $ take 10 $ fixedPoint cos 1
0.7390851332151607
The
findZero function finds a zero of a scalar function using
Newton's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.) If the stream becomes constant
("it converges"), no further elements are returned.
Examples:
>>> take 10 $ findZero (\x->x^2-4) 1
[1.0,2.5,2.05,2.000609756097561,2.0000000929222947,2.000000000000002,2.0]
>>> last $ take 10 $ findZero ((+1).(^2)) (1 :+ 1)
0.0 :+ 1.0
The
findZeroNoEq function behaves the same as
findZero
except that it doesn't truncate the list once the results become
constant. This means it can be used with types without an
Eq
instance.
The
fixedPoint function find a fixedpoint of a scalar function
using Newton's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.)
If the stream becomes constant ("it converges"), no further elements
are returned.
>>> last $ take 10 $ fixedPoint cos 1
0.7390851332151607
The
fixedPointNoEq function behaves the same as
fixedPoint except that it doesn't truncate the list once the
results become constant. This means it can be used with types without
an
Eq instance.
The
findZero function finds a zero of a scalar function using
Newton's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.) If the stream becomes constant
("it converges"), no further elements are returned.
Examples:
>>> take 10 $ findZero (\x->x^2-4) 1
[1.0,2.5,2.05,2.000609756097561,2.0000000929222947,2.000000000000002,2.0]
The
fixedPoint function find a fixedpoint of a scalar function
using Newton's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.)
If the stream becomes constant ("it converges"), no further elements
are returned.
>>> last $ take 10 $ fixedPoint cos 1
0.7390851332151607
The
findZero function finds a zero of a scalar function using
Halley's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.) If the stream becomes constant
("it converges"), no further elements are returned.
Examples:
>>> take 10 $ findZero (\x->x^2-4) 1
[1.0,1.8571428571428572,1.9997967892704736,1.9999999999994755,2.0]
>>> last $ take 10 $ findZero ((+1).(^2)) (1 :+ 1)
0.0 :+ 1.0
The
findZeroNoEq function behaves the same as
findZero
except that it doesn't truncate the list once the results become
constant. This means it can be used with types without an
Eq
instance.
The
fixedPoint function find a fixedpoint of a scalar function
using Halley's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.)
If the stream becomes constant ("it converges"), no further elements
are returned.
>>> last $ take 10 $ fixedPoint cos 1
0.7390851332151607
The
fixedPointNoEq function behaves the same as
fixedPoint except that it doesn't truncate the list once the
results become constant. This means it can be used with types without
an
Eq instance.
The
findZero function finds a zero of a scalar function using
Halley's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.) If the stream becomes constant
("it converges"), no further elements are returned.
Examples:
>>> take 10 $ findZero (\x->x^2-4) 1
[1.0,1.8571428571428572,1.9997967892704736,1.9999999999994755,2.0]
The
fixedPoint function find a fixedpoint of a scalar function
using Halley's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.)
If the stream becomes constant ("it converges"), no further elements
are returned.
>>> last $ take 10 $ fixedPoint cos 1
0.7390851332151607
The
findZero function finds a zero of a scalar function using
Newton's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.) If the stream becomes constant
("it converges"), no further elements are returned.
Examples:
>>> take 10 $ findZero (\x->x^2-4) 1
[1.0,2.5,2.05,2.000609756097561,2.0000000929222947,2.000000000000002,2.0]
>>> last $ take 10 $ findZero ((+1).(^2)) (1 :+ 1)
0.0 :+ 1.0
The
findZeroNoEq function behaves the same as
findZero
except that it doesn't truncate the list once the results become
constant. This means it can be used with types without an
Eq
instance.
The
fixedPoint function find a fixedpoint of a scalar function
using Newton's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.)
If the stream becomes constant ("it converges"), no further elements
are returned.
>>> last $ take 10 $ fixedPoint cos 1
0.7390851332151607
The
fixedPointNoEq function behaves the same as
fixedPoint except that it doesn't truncate the list once the
results become constant. This means it can be used with types without
an
Eq instance.
The
findZero function finds a zero of a scalar function using
Newton's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.) If the stream becomes constant
("it converges"), no further elements are returned.
Examples:
>>> take 10 $ findZero (\x->x^2-4) 1
[1.0,2.5,2.05,2.000609756097561,2.0000000929222947,2.000000000000002,2.0]
The
fixedPoint function find a fixedpoint of a scalar function
using Newton's method; its output is a stream of increasingly accurate
results. (Modulo the usual caveats.)
If the stream becomes constant ("it converges"), no further elements
are returned.
>>> last $ take 10 $ fixedPoint cos 1
0.7390851332151607
Unsafe and often partial combinators intended for internal usage.
Handle with care.