Re: Linear approx for cube root?
- From: "Zdislav V. Kovarik" <kovarik@xxxxxxxxxxx>
- Date: Tue, 24 Oct 2006 19:01:03 -0400
On Tue, 23 Oct 2006, sherwood@xxxxxxxxxxxxxx wrote:
For a cube root subroutine, I want the best linear approximation toThe cube root function on your disconnected domain has odd symmetry, so
CUBEROOT(x), for x real and in the (discontinuous) range 1/2 <= |x| <
1. In other words, determine a and b to minimize the expected value of
diff = | ax + b - CUBEROOT(x) |. Initially, I am assuming all values of
x are equally probable.
the best linear approximation is of the form a*x only (b must be 0).
After some algebra and calculus, I obtained
a = 2/5^(1/3), approximately 1.16960709528515
Is this what you really wanted?
For comparison, the value of a that minimizes the maximal absolute
difference is
a=(2+4^(1/3))/3, approximately 1.19580035065607
And the value of a for the least squares error is
(9/49)*(8-2^(2/3)), approximately 1.17782429657727
Cheers, ZVK(Slavek).
.
- References:
- Linear approx for cube root?
- From: sherwood@xxxxxxxxxxxxxx
- Linear approx for cube root?
- Prev by Date: Re: Linear approx for cube root?
- Next by Date: Re: segmentation fault with nleq1...
- Previous by thread: Re: Linear approx for cube root?
- Next by thread: Conditioning nearly-commuting matrices
- Index(es):