
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (fma l l (* 2.0 (* t t))))
(t_2 (+ t_1 t_1))
(t_3 (* 2.0 (+ (* t t) (/ (* t t) x))))
(t_4 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_5 (/ (* l l) x)))
(if (<= t -9.5e+20)
(- t_4)
(if (<= t -5.8e-174)
(* t (/ (sqrt 2.0) (sqrt (+ t_5 (+ t_5 t_3)))))
(if (<= t -3.5e-234)
(+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x))))
(if (<= t 1.4e-277)
(* t (/ (sqrt x) l))
(if (<= t 1.9e-237)
(*
t
(/
(sqrt 2.0)
(fma 0.5 (/ t_2 (* (sqrt 2.0) (* t x))) (* t (sqrt 2.0)))))
(if (<= t 4.5e-50)
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_5 (+ (+ t_3 (/ t_2 (* x x))) (/ t_1 x))))))
t_4))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = fma(l, l, (2.0 * (t * t)));
double t_2 = t_1 + t_1;
double t_3 = 2.0 * ((t * t) + ((t * t) / x));
double t_4 = sqrt(((x + -1.0) / (x + 1.0)));
double t_5 = (l * l) / x;
double tmp;
if (t <= -9.5e+20) {
tmp = -t_4;
} else if (t <= -5.8e-174) {
tmp = t * (sqrt(2.0) / sqrt((t_5 + (t_5 + t_3))));
} else if (t <= -3.5e-234) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else if (t <= 1.4e-277) {
tmp = t * (sqrt(x) / l);
} else if (t <= 1.9e-237) {
tmp = t * (sqrt(2.0) / fma(0.5, (t_2 / (sqrt(2.0) * (t * x))), (t * sqrt(2.0))));
} else if (t <= 4.5e-50) {
tmp = t * (sqrt(2.0) / sqrt((t_5 + ((t_3 + (t_2 / (x * x))) + (t_1 / x)))));
} else {
tmp = t_4;
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = fma(l, l, Float64(2.0 * Float64(t * t))) t_2 = Float64(t_1 + t_1) t_3 = Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) t_4 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_5 = Float64(Float64(l * l) / x) tmp = 0.0 if (t <= -9.5e+20) tmp = Float64(-t_4); elseif (t <= -5.8e-174) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_5 + Float64(t_5 + t_3))))); elseif (t <= -3.5e-234) tmp = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * x)))); elseif (t <= 1.4e-277) tmp = Float64(t * Float64(sqrt(x) / l)); elseif (t <= 1.9e-237) tmp = Float64(t * Float64(sqrt(2.0) / fma(0.5, Float64(t_2 / Float64(sqrt(2.0) * Float64(t * x))), Float64(t * sqrt(2.0))))); elseif (t <= 4.5e-50) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_5 + Float64(Float64(t_3 + Float64(t_2 / Float64(x * x))) + Float64(t_1 / x)))))); else tmp = t_4; end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(l * l + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -9.5e+20], (-t$95$4), If[LessEqual[t, -5.8e-174], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$5 + N[(t$95$5 + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.5e-234], N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e-277], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-237], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.5 * N[(t$95$2 / N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-50], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$5 + N[(N[(t$95$3 + N[(t$95$2 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)\\
t_2 := t_1 + t_1\\
t_3 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
t_4 := \sqrt{\frac{x + -1}{x + 1}}\\
t_5 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{+20}:\\
\;\;\;\;-t_4\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-174}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(t_5 + t_3\right)}}\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-234}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-277}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-237}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{t_2}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-50}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(\left(t_3 + \frac{t_2}{x \cdot x}\right) + \frac{t_1}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if t < -9.5e20Initial program 32.4%
associate-*r/32.4%
fma-neg32.4%
sub-neg32.4%
metadata-eval32.4%
+-commutative32.4%
fma-def32.4%
distribute-rgt-neg-in32.4%
Simplified32.4%
Applied egg-rr89.2%
Taylor expanded in t around -inf 98.8%
mul-1-neg98.8%
sub-neg98.8%
metadata-eval98.8%
Simplified98.8%
if -9.5e20 < t < -5.8000000000000002e-174Initial program 49.9%
associate-*l/50.0%
Simplified50.0%
Taylor expanded in x around inf 91.4%
associate--l+91.4%
unpow291.4%
distribute-lft-out91.4%
unpow291.4%
unpow291.4%
associate-*r/91.4%
mul-1-neg91.4%
unpow291.4%
fma-udef91.4%
unpow291.4%
Simplified91.4%
Taylor expanded in l around inf 91.4%
associate-*r/91.4%
mul-1-neg91.4%
unpow291.4%
Simplified91.4%
if -5.8000000000000002e-174 < t < -3.5000000000000001e-234Initial program 2.6%
associate-*r/2.6%
fma-neg2.6%
sub-neg2.6%
metadata-eval2.6%
+-commutative2.6%
fma-def2.6%
distribute-rgt-neg-in2.6%
Simplified2.6%
Applied egg-rr38.7%
Taylor expanded in t around -inf 68.5%
mul-1-neg68.5%
sub-neg68.5%
metadata-eval68.5%
Simplified68.5%
Taylor expanded in x around inf 68.5%
associate--l+68.5%
associate-*r/68.5%
metadata-eval68.5%
unpow268.5%
Simplified68.5%
if -3.5000000000000001e-234 < t < 1.39999999999999988e-277Initial program 6.6%
associate-*l/6.6%
Simplified6.6%
Taylor expanded in x around inf 69.6%
associate--l+69.6%
unpow269.6%
distribute-lft-out69.6%
unpow269.6%
unpow269.6%
associate-*r/69.6%
mul-1-neg69.6%
unpow269.6%
fma-udef69.6%
unpow269.6%
Simplified69.6%
Taylor expanded in t around 0 69.5%
cancel-sign-sub-inv69.5%
metadata-eval69.5%
distribute-rgt1-in69.5%
metadata-eval69.5%
unpow269.5%
Simplified69.5%
Taylor expanded in l around 0 65.8%
associate-*l/65.8%
*-lft-identity65.8%
Simplified65.8%
if 1.39999999999999988e-277 < t < 1.90000000000000012e-237Initial program 2.1%
associate-*l/2.1%
Simplified2.1%
Taylor expanded in x around inf 88.5%
fma-def88.5%
sub-neg88.5%
unpow288.5%
fma-udef88.5%
unpow288.5%
mul-1-neg88.5%
remove-double-neg88.5%
unpow288.5%
fma-udef88.5%
unpow288.5%
*-commutative88.5%
Simplified88.5%
if 1.90000000000000012e-237 < t < 4.49999999999999962e-50Initial program 20.7%
associate-*l/20.7%
Simplified20.7%
Taylor expanded in x around -inf 86.9%
associate--l+86.9%
unpow286.9%
sub-neg86.9%
Simplified86.9%
if 4.49999999999999962e-50 < t Initial program 38.0%
associate-*r/38.0%
fma-neg38.0%
sub-neg38.0%
metadata-eval38.0%
+-commutative38.0%
fma-def38.0%
distribute-rgt-neg-in38.0%
Simplified38.0%
Applied egg-rr76.9%
Taylor expanded in t around inf 90.4%
Final simplification89.0%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))) (t_2 (/ (* l l) x)))
(if (<= t -1.35e+21)
(- t_1)
(if (<= t -4.1e-173)
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_2 (+ t_2 (* 2.0 (+ (* t t) (/ (* t t) x))))))))
(if (<= t -1.68e-233)
(+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x))))
(if (<= t 4e-162) (* t (/ (sqrt x) l)) t_1))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (l * l) / x;
double tmp;
if (t <= -1.35e+21) {
tmp = -t_1;
} else if (t <= -4.1e-173) {
tmp = t * (sqrt(2.0) / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x)))))));
} else if (t <= -1.68e-233) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else if (t <= 4e-162) {
tmp = t * (sqrt(x) / l);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
t_2 = (l * l) / x
if (t <= (-1.35d+21)) then
tmp = -t_1
else if (t <= (-4.1d-173)) then
tmp = t * (sqrt(2.0d0) / sqrt((t_2 + (t_2 + (2.0d0 * ((t * t) + ((t * t) / x)))))))
else if (t <= (-1.68d-233)) then
tmp = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * x)))
else if (t <= 4d-162) then
tmp = t * (sqrt(x) / l)
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (l * l) / x;
double tmp;
if (t <= -1.35e+21) {
tmp = -t_1;
} else if (t <= -4.1e-173) {
tmp = t * (Math.sqrt(2.0) / Math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x)))))));
} else if (t <= -1.68e-233) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else if (t <= 4e-162) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) t_2 = (l * l) / x tmp = 0 if t <= -1.35e+21: tmp = -t_1 elif t <= -4.1e-173: tmp = t * (math.sqrt(2.0) / math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x))))))) elif t <= -1.68e-233: tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))) elif t <= 4e-162: tmp = t * (math.sqrt(x) / l) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_2 = Float64(Float64(l * l) / x) tmp = 0.0 if (t <= -1.35e+21) tmp = Float64(-t_1); elseif (t <= -4.1e-173) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_2 + Float64(t_2 + Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x)))))))); elseif (t <= -1.68e-233) tmp = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * x)))); elseif (t <= 4e-162) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); t_2 = (l * l) / x; tmp = 0.0; if (t <= -1.35e+21) tmp = -t_1; elseif (t <= -4.1e-173) tmp = t * (sqrt(2.0) / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x))))))); elseif (t <= -1.68e-233) tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))); elseif (t <= 4e-162) tmp = t * (sqrt(x) / l); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -1.35e+21], (-t$95$1), If[LessEqual[t, -4.1e-173], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$2 + N[(t$95$2 + N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.68e-233], N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e-162], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t \leq -1.35 \cdot 10^{+21}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-173}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_2 + \left(t_2 + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\
\mathbf{elif}\;t \leq -1.68 \cdot 10^{-233}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-162}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.35e21Initial program 32.4%
associate-*r/32.4%
fma-neg32.4%
sub-neg32.4%
metadata-eval32.4%
+-commutative32.4%
fma-def32.4%
distribute-rgt-neg-in32.4%
Simplified32.4%
Applied egg-rr89.2%
Taylor expanded in t around -inf 98.8%
mul-1-neg98.8%
sub-neg98.8%
metadata-eval98.8%
Simplified98.8%
if -1.35e21 < t < -4.0999999999999997e-173Initial program 49.9%
associate-*l/50.0%
Simplified50.0%
Taylor expanded in x around inf 91.4%
associate--l+91.4%
unpow291.4%
distribute-lft-out91.4%
unpow291.4%
unpow291.4%
associate-*r/91.4%
mul-1-neg91.4%
unpow291.4%
fma-udef91.4%
unpow291.4%
Simplified91.4%
Taylor expanded in l around inf 91.4%
associate-*r/91.4%
mul-1-neg91.4%
unpow291.4%
Simplified91.4%
if -4.0999999999999997e-173 < t < -1.67999999999999993e-233Initial program 2.6%
associate-*r/2.6%
fma-neg2.6%
sub-neg2.6%
metadata-eval2.6%
+-commutative2.6%
fma-def2.6%
distribute-rgt-neg-in2.6%
Simplified2.6%
Applied egg-rr38.7%
Taylor expanded in t around -inf 68.5%
mul-1-neg68.5%
sub-neg68.5%
metadata-eval68.5%
Simplified68.5%
Taylor expanded in x around inf 68.5%
associate--l+68.5%
associate-*r/68.5%
metadata-eval68.5%
unpow268.5%
Simplified68.5%
if -1.67999999999999993e-233 < t < 3.99999999999999982e-162Initial program 4.2%
associate-*l/4.2%
Simplified4.2%
Taylor expanded in x around inf 63.2%
associate--l+63.2%
unpow263.2%
distribute-lft-out63.2%
unpow263.2%
unpow263.2%
associate-*r/63.2%
mul-1-neg63.2%
unpow263.2%
fma-udef63.2%
unpow263.2%
Simplified63.2%
Taylor expanded in t around 0 62.9%
cancel-sign-sub-inv62.9%
metadata-eval62.9%
distribute-rgt1-in62.9%
metadata-eval62.9%
unpow262.9%
Simplified62.9%
Taylor expanded in l around 0 54.3%
associate-*l/54.3%
*-lft-identity54.3%
Simplified54.3%
if 3.99999999999999982e-162 < t Initial program 37.4%
associate-*r/37.4%
fma-neg37.4%
sub-neg37.4%
metadata-eval37.4%
+-commutative37.4%
fma-def37.4%
distribute-rgt-neg-in37.4%
Simplified37.4%
Applied egg-rr70.5%
Taylor expanded in t around inf 89.7%
Final simplification85.1%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -3.2e-126)
(- t_1)
(if (<= t -7.2e-178)
(* t (* (/ (sqrt 2.0) l) (sqrt (- (* x 0.5) 0.5))))
(if (<= t -1.3e-230)
(+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x))))
(if (<= t 2.15e-161) (* t (/ (sqrt x) l)) t_1))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -3.2e-126) {
tmp = -t_1;
} else if (t <= -7.2e-178) {
tmp = t * ((sqrt(2.0) / l) * sqrt(((x * 0.5) - 0.5)));
} else if (t <= -1.3e-230) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else if (t <= 2.15e-161) {
tmp = t * (sqrt(x) / l);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-3.2d-126)) then
tmp = -t_1
else if (t <= (-7.2d-178)) then
tmp = t * ((sqrt(2.0d0) / l) * sqrt(((x * 0.5d0) - 0.5d0)))
else if (t <= (-1.3d-230)) then
tmp = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * x)))
else if (t <= 2.15d-161) then
tmp = t * (sqrt(x) / l)
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -3.2e-126) {
tmp = -t_1;
} else if (t <= -7.2e-178) {
tmp = t * ((Math.sqrt(2.0) / l) * Math.sqrt(((x * 0.5) - 0.5)));
} else if (t <= -1.3e-230) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else if (t <= 2.15e-161) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -3.2e-126: tmp = -t_1 elif t <= -7.2e-178: tmp = t * ((math.sqrt(2.0) / l) * math.sqrt(((x * 0.5) - 0.5))) elif t <= -1.3e-230: tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))) elif t <= 2.15e-161: tmp = t * (math.sqrt(x) / l) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -3.2e-126) tmp = Float64(-t_1); elseif (t <= -7.2e-178) tmp = Float64(t * Float64(Float64(sqrt(2.0) / l) * sqrt(Float64(Float64(x * 0.5) - 0.5)))); elseif (t <= -1.3e-230) tmp = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * x)))); elseif (t <= 2.15e-161) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -3.2e-126) tmp = -t_1; elseif (t <= -7.2e-178) tmp = t * ((sqrt(2.0) / l) * sqrt(((x * 0.5) - 0.5))); elseif (t <= -1.3e-230) tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))); elseif (t <= 2.15e-161) tmp = t * (sqrt(x) / l); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -3.2e-126], (-t$95$1), If[LessEqual[t, -7.2e-178], N[(t * N[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(N[(x * 0.5), $MachinePrecision] - 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.3e-230], N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.15e-161], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{-126}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-178}:\\
\;\;\;\;t \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{x \cdot 0.5 - 0.5}\right)\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-230}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-161}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.2000000000000001e-126Initial program 38.5%
associate-*r/38.5%
fma-neg38.5%
sub-neg38.5%
metadata-eval38.5%
+-commutative38.5%
fma-def38.5%
distribute-rgt-neg-in38.5%
Simplified38.5%
Applied egg-rr84.7%
Taylor expanded in t around -inf 94.8%
mul-1-neg94.8%
sub-neg94.8%
metadata-eval94.8%
Simplified94.8%
if -3.2000000000000001e-126 < t < -7.19999999999999987e-178Initial program 26.4%
associate-*r/26.4%
fma-neg26.5%
sub-neg26.5%
metadata-eval26.5%
+-commutative26.5%
fma-def26.5%
distribute-rgt-neg-in26.5%
Simplified26.5%
Taylor expanded in l around inf 1.9%
*-commutative1.9%
associate--l+1.9%
sub-neg1.9%
metadata-eval1.9%
+-commutative1.9%
sub-neg1.9%
metadata-eval1.9%
+-commutative1.9%
associate-/l*1.9%
Simplified1.9%
Taylor expanded in x around 0 43.0%
Taylor expanded in l around 0 42.9%
*-commutative42.9%
fma-neg42.9%
metadata-eval42.9%
associate-/l*43.0%
associate-*r/43.4%
associate-/r/43.0%
*-commutative43.0%
*-commutative43.0%
associate-/l*43.0%
fma-udef43.0%
*-commutative43.0%
fma-def43.0%
Simplified43.0%
Taylor expanded in l around 0 42.9%
if -7.19999999999999987e-178 < t < -1.3000000000000001e-230Initial program 2.6%
associate-*r/2.6%
fma-neg2.6%
sub-neg2.6%
metadata-eval2.6%
+-commutative2.6%
fma-def2.6%
distribute-rgt-neg-in2.6%
Simplified2.6%
Applied egg-rr40.6%
Taylor expanded in t around -inf 71.9%
mul-1-neg71.9%
sub-neg71.9%
metadata-eval71.9%
Simplified71.9%
Taylor expanded in x around inf 71.9%
associate--l+71.9%
associate-*r/71.9%
metadata-eval71.9%
unpow271.9%
Simplified71.9%
if -1.3000000000000001e-230 < t < 2.14999999999999983e-161Initial program 4.2%
associate-*l/4.2%
Simplified4.2%
Taylor expanded in x around inf 63.2%
associate--l+63.2%
unpow263.2%
distribute-lft-out63.2%
unpow263.2%
unpow263.2%
associate-*r/63.2%
mul-1-neg63.2%
unpow263.2%
fma-udef63.2%
unpow263.2%
Simplified63.2%
Taylor expanded in t around 0 62.9%
cancel-sign-sub-inv62.9%
metadata-eval62.9%
distribute-rgt1-in62.9%
metadata-eval62.9%
unpow262.9%
Simplified62.9%
Taylor expanded in l around 0 54.3%
associate-*l/54.3%
*-lft-identity54.3%
Simplified54.3%
if 2.14999999999999983e-161 < t Initial program 37.4%
associate-*r/37.4%
fma-neg37.4%
sub-neg37.4%
metadata-eval37.4%
+-commutative37.4%
fma-def37.4%
distribute-rgt-neg-in37.4%
Simplified37.4%
Applied egg-rr70.5%
Taylor expanded in t around inf 89.7%
Final simplification82.0%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* t (/ (sqrt x) l)))
(t_2 (+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x))))))
(if (<= t -1.3e-126)
t_2
(if (<= t -1.3e-177)
t_1
(if (<= t -1.15e-229)
t_2
(if (<= t 4.05e-162) t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(x) / l);
double t_2 = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
double tmp;
if (t <= -1.3e-126) {
tmp = t_2;
} else if (t <= -1.3e-177) {
tmp = t_1;
} else if (t <= -1.15e-229) {
tmp = t_2;
} else if (t <= 4.05e-162) {
tmp = t_1;
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (sqrt(x) / l)
t_2 = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * x)))
if (t <= (-1.3d-126)) then
tmp = t_2
else if (t <= (-1.3d-177)) then
tmp = t_1
else if (t <= (-1.15d-229)) then
tmp = t_2
else if (t <= 4.05d-162) then
tmp = t_1
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = t * (Math.sqrt(x) / l);
double t_2 = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
double tmp;
if (t <= -1.3e-126) {
tmp = t_2;
} else if (t <= -1.3e-177) {
tmp = t_1;
} else if (t <= -1.15e-229) {
tmp = t_2;
} else if (t <= 4.05e-162) {
tmp = t_1;
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = t * (math.sqrt(x) / l) t_2 = -1.0 + ((1.0 / x) - (0.5 / (x * x))) tmp = 0 if t <= -1.3e-126: tmp = t_2 elif t <= -1.3e-177: tmp = t_1 elif t <= -1.15e-229: tmp = t_2 elif t <= 4.05e-162: tmp = t_1 else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(x) / l)) t_2 = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * x)))) tmp = 0.0 if (t <= -1.3e-126) tmp = t_2; elseif (t <= -1.3e-177) tmp = t_1; elseif (t <= -1.15e-229) tmp = t_2; elseif (t <= 4.05e-162) tmp = t_1; else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = t * (sqrt(x) / l); t_2 = -1.0 + ((1.0 / x) - (0.5 / (x * x))); tmp = 0.0; if (t <= -1.3e-126) tmp = t_2; elseif (t <= -1.3e-177) tmp = t_1; elseif (t <= -1.15e-229) tmp = t_2; elseif (t <= 4.05e-162) tmp = t_1; else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.3e-126], t$95$2, If[LessEqual[t, -1.3e-177], t$95$1, If[LessEqual[t, -1.15e-229], t$95$2, If[LessEqual[t, 4.05e-162], t$95$1, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{x}}{\ell}\\
t_2 := -1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{-126}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-177}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-229}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 4.05 \cdot 10^{-162}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -1.3e-126 or -1.3e-177 < t < -1.14999999999999998e-229Initial program 32.9%
associate-*r/32.8%
fma-neg32.8%
sub-neg32.8%
metadata-eval32.8%
+-commutative32.8%
fma-def32.8%
distribute-rgt-neg-in32.8%
Simplified32.8%
Applied egg-rr77.8%
Taylor expanded in t around -inf 91.2%
mul-1-neg91.2%
sub-neg91.2%
metadata-eval91.2%
Simplified91.2%
Taylor expanded in x around inf 90.3%
associate--l+90.3%
associate-*r/90.3%
metadata-eval90.3%
unpow290.3%
Simplified90.3%
if -1.3e-126 < t < -1.3e-177 or -1.14999999999999998e-229 < t < 4.05000000000000001e-162Initial program 9.3%
associate-*l/9.4%
Simplified9.4%
Taylor expanded in x around inf 67.5%
associate--l+67.5%
unpow267.5%
distribute-lft-out67.5%
unpow267.5%
unpow267.5%
associate-*r/67.5%
mul-1-neg67.5%
unpow267.5%
fma-udef67.5%
unpow267.5%
Simplified67.5%
Taylor expanded in t around 0 61.7%
cancel-sign-sub-inv61.7%
metadata-eval61.7%
distribute-rgt1-in61.7%
metadata-eval61.7%
unpow261.7%
Simplified61.7%
Taylor expanded in l around 0 51.7%
associate-*l/51.7%
*-lft-identity51.7%
Simplified51.7%
if 4.05000000000000001e-162 < t Initial program 37.4%
associate-*r/37.4%
fma-neg37.4%
sub-neg37.4%
metadata-eval37.4%
+-commutative37.4%
fma-def37.4%
distribute-rgt-neg-in37.4%
Simplified37.4%
Applied egg-rr70.5%
Taylor expanded in t around inf 89.7%
Final simplification81.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* t (/ (sqrt x) l))) (t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -2.5e-126)
(- t_2)
(if (<= t -2.2e-177)
t_1
(if (<= t -4.4e-229)
(+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x))))
(if (<= t 1.9e-159) t_1 t_2))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(x) / l);
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.5e-126) {
tmp = -t_2;
} else if (t <= -2.2e-177) {
tmp = t_1;
} else if (t <= -4.4e-229) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else if (t <= 1.9e-159) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (sqrt(x) / l)
t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-2.5d-126)) then
tmp = -t_2
else if (t <= (-2.2d-177)) then
tmp = t_1
else if (t <= (-4.4d-229)) then
tmp = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * x)))
else if (t <= 1.9d-159) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = t * (Math.sqrt(x) / l);
double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.5e-126) {
tmp = -t_2;
} else if (t <= -2.2e-177) {
tmp = t_1;
} else if (t <= -4.4e-229) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else if (t <= 1.9e-159) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = t * (math.sqrt(x) / l) t_2 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -2.5e-126: tmp = -t_2 elif t <= -2.2e-177: tmp = t_1 elif t <= -4.4e-229: tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))) elif t <= 1.9e-159: tmp = t_1 else: tmp = t_2 return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(x) / l)) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -2.5e-126) tmp = Float64(-t_2); elseif (t <= -2.2e-177) tmp = t_1; elseif (t <= -4.4e-229) tmp = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * x)))); elseif (t <= 1.9e-159) tmp = t_1; else tmp = t_2; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = t * (sqrt(x) / l); t_2 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -2.5e-126) tmp = -t_2; elseif (t <= -2.2e-177) tmp = t_1; elseif (t <= -4.4e-229) tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))); elseif (t <= 1.9e-159) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.5e-126], (-t$95$2), If[LessEqual[t, -2.2e-177], t$95$1, If[LessEqual[t, -4.4e-229], N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-159], t$95$1, t$95$2]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{x}}{\ell}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{-126}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -2.2 \cdot 10^{-177}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{-229}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-159}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.50000000000000003e-126Initial program 38.5%
associate-*r/38.5%
fma-neg38.5%
sub-neg38.5%
metadata-eval38.5%
+-commutative38.5%
fma-def38.5%
distribute-rgt-neg-in38.5%
Simplified38.5%
Applied egg-rr84.7%
Taylor expanded in t around -inf 94.8%
mul-1-neg94.8%
sub-neg94.8%
metadata-eval94.8%
Simplified94.8%
if -2.50000000000000003e-126 < t < -2.20000000000000011e-177 or -4.3999999999999998e-229 < t < 1.9e-159Initial program 9.3%
associate-*l/9.4%
Simplified9.4%
Taylor expanded in x around inf 67.5%
associate--l+67.5%
unpow267.5%
distribute-lft-out67.5%
unpow267.5%
unpow267.5%
associate-*r/67.5%
mul-1-neg67.5%
unpow267.5%
fma-udef67.5%
unpow267.5%
Simplified67.5%
Taylor expanded in t around 0 61.7%
cancel-sign-sub-inv61.7%
metadata-eval61.7%
distribute-rgt1-in61.7%
metadata-eval61.7%
unpow261.7%
Simplified61.7%
Taylor expanded in l around 0 51.7%
associate-*l/51.7%
*-lft-identity51.7%
Simplified51.7%
if -2.20000000000000011e-177 < t < -4.3999999999999998e-229Initial program 2.6%
associate-*r/2.6%
fma-neg2.6%
sub-neg2.6%
metadata-eval2.6%
+-commutative2.6%
fma-def2.6%
distribute-rgt-neg-in2.6%
Simplified2.6%
Applied egg-rr40.6%
Taylor expanded in t around -inf 71.9%
mul-1-neg71.9%
sub-neg71.9%
metadata-eval71.9%
Simplified71.9%
Taylor expanded in x around inf 71.9%
associate--l+71.9%
associate-*r/71.9%
metadata-eval71.9%
unpow271.9%
Simplified71.9%
if 1.9e-159 < t Initial program 37.4%
associate-*r/37.4%
fma-neg37.4%
sub-neg37.4%
metadata-eval37.4%
+-commutative37.4%
fma-def37.4%
distribute-rgt-neg-in37.4%
Simplified37.4%
Applied egg-rr70.5%
Taylor expanded in t around inf 89.7%
Final simplification82.0%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (sqrt x) (/ t l)))
(t_2 (+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x))))))
(if (<= t -1.8e-126)
t_2
(if (<= t -1.1e-177)
t_1
(if (<= t -2.8e-234)
t_2
(if (<= t 5.5e-161) t_1 (+ 1.0 (+ (/ (/ 0.5 x) x) (/ -1.0 x)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(x) * (t / l);
double t_2 = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
double tmp;
if (t <= -1.8e-126) {
tmp = t_2;
} else if (t <= -1.1e-177) {
tmp = t_1;
} else if (t <= -2.8e-234) {
tmp = t_2;
} else if (t <= 5.5e-161) {
tmp = t_1;
} else {
tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt(x) * (t / l)
t_2 = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * x)))
if (t <= (-1.8d-126)) then
tmp = t_2
else if (t <= (-1.1d-177)) then
tmp = t_1
else if (t <= (-2.8d-234)) then
tmp = t_2
else if (t <= 5.5d-161) then
tmp = t_1
else
tmp = 1.0d0 + (((0.5d0 / x) / x) + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(x) * (t / l);
double t_2 = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
double tmp;
if (t <= -1.8e-126) {
tmp = t_2;
} else if (t <= -1.1e-177) {
tmp = t_1;
} else if (t <= -2.8e-234) {
tmp = t_2;
} else if (t <= 5.5e-161) {
tmp = t_1;
} else {
tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(x) * (t / l) t_2 = -1.0 + ((1.0 / x) - (0.5 / (x * x))) tmp = 0 if t <= -1.8e-126: tmp = t_2 elif t <= -1.1e-177: tmp = t_1 elif t <= -2.8e-234: tmp = t_2 elif t <= 5.5e-161: tmp = t_1 else: tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(x) * Float64(t / l)) t_2 = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * x)))) tmp = 0.0 if (t <= -1.8e-126) tmp = t_2; elseif (t <= -1.1e-177) tmp = t_1; elseif (t <= -2.8e-234) tmp = t_2; elseif (t <= 5.5e-161) tmp = t_1; else tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) / x) + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(x) * (t / l); t_2 = -1.0 + ((1.0 / x) - (0.5 / (x * x))); tmp = 0.0; if (t <= -1.8e-126) tmp = t_2; elseif (t <= -1.1e-177) tmp = t_1; elseif (t <= -2.8e-234) tmp = t_2; elseif (t <= 5.5e-161) tmp = t_1; else tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[Sqrt[x], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.8e-126], t$95$2, If[LessEqual[t, -1.1e-177], t$95$1, If[LessEqual[t, -2.8e-234], t$95$2, If[LessEqual[t, 5.5e-161], t$95$1, N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{x} \cdot \frac{t}{\ell}\\
t_2 := -1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{-126}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-177}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-234}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-161}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -1.8e-126 or -1.10000000000000006e-177 < t < -2.7999999999999999e-234Initial program 32.9%
associate-*r/32.8%
fma-neg32.8%
sub-neg32.8%
metadata-eval32.8%
+-commutative32.8%
fma-def32.8%
distribute-rgt-neg-in32.8%
Simplified32.8%
Applied egg-rr77.8%
Taylor expanded in t around -inf 91.2%
mul-1-neg91.2%
sub-neg91.2%
metadata-eval91.2%
Simplified91.2%
Taylor expanded in x around inf 90.3%
associate--l+90.3%
associate-*r/90.3%
metadata-eval90.3%
unpow290.3%
Simplified90.3%
if -1.8e-126 < t < -1.10000000000000006e-177 or -2.7999999999999999e-234 < t < 5.5e-161Initial program 9.3%
associate-*l/9.4%
Simplified9.4%
Taylor expanded in x around inf 67.5%
associate--l+67.5%
unpow267.5%
distribute-lft-out67.5%
unpow267.5%
unpow267.5%
associate-*r/67.5%
mul-1-neg67.5%
unpow267.5%
fma-udef67.5%
unpow267.5%
Simplified67.5%
Taylor expanded in t around 0 61.7%
cancel-sign-sub-inv61.7%
metadata-eval61.7%
distribute-rgt1-in61.7%
metadata-eval61.7%
unpow261.7%
Simplified61.7%
Taylor expanded in l around 0 48.1%
if 5.5e-161 < t Initial program 37.4%
associate-*r/37.4%
fma-neg37.4%
sub-neg37.4%
metadata-eval37.4%
+-commutative37.4%
fma-def37.4%
distribute-rgt-neg-in37.4%
Simplified37.4%
Applied egg-rr70.5%
Taylor expanded in t around inf 89.7%
Taylor expanded in x around inf 89.6%
associate--l+89.6%
associate-*r/89.6%
metadata-eval89.6%
unpow289.6%
associate-/r*89.6%
Simplified89.6%
Final simplification80.8%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* t (/ (sqrt x) l)))
(t_2 (+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x))))))
(if (<= t -8e-126)
t_2
(if (<= t -5.6e-178)
t_1
(if (<= t -8e-234)
t_2
(if (<= t 8.5e-160) t_1 (+ 1.0 (+ (/ (/ 0.5 x) x) (/ -1.0 x)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(x) / l);
double t_2 = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
double tmp;
if (t <= -8e-126) {
tmp = t_2;
} else if (t <= -5.6e-178) {
tmp = t_1;
} else if (t <= -8e-234) {
tmp = t_2;
} else if (t <= 8.5e-160) {
tmp = t_1;
} else {
tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (sqrt(x) / l)
t_2 = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * x)))
if (t <= (-8d-126)) then
tmp = t_2
else if (t <= (-5.6d-178)) then
tmp = t_1
else if (t <= (-8d-234)) then
tmp = t_2
else if (t <= 8.5d-160) then
tmp = t_1
else
tmp = 1.0d0 + (((0.5d0 / x) / x) + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = t * (Math.sqrt(x) / l);
double t_2 = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
double tmp;
if (t <= -8e-126) {
tmp = t_2;
} else if (t <= -5.6e-178) {
tmp = t_1;
} else if (t <= -8e-234) {
tmp = t_2;
} else if (t <= 8.5e-160) {
tmp = t_1;
} else {
tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = t * (math.sqrt(x) / l) t_2 = -1.0 + ((1.0 / x) - (0.5 / (x * x))) tmp = 0 if t <= -8e-126: tmp = t_2 elif t <= -5.6e-178: tmp = t_1 elif t <= -8e-234: tmp = t_2 elif t <= 8.5e-160: tmp = t_1 else: tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(x) / l)) t_2 = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * x)))) tmp = 0.0 if (t <= -8e-126) tmp = t_2; elseif (t <= -5.6e-178) tmp = t_1; elseif (t <= -8e-234) tmp = t_2; elseif (t <= 8.5e-160) tmp = t_1; else tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) / x) + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = t * (sqrt(x) / l); t_2 = -1.0 + ((1.0 / x) - (0.5 / (x * x))); tmp = 0.0; if (t <= -8e-126) tmp = t_2; elseif (t <= -5.6e-178) tmp = t_1; elseif (t <= -8e-234) tmp = t_2; elseif (t <= 8.5e-160) tmp = t_1; else tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8e-126], t$95$2, If[LessEqual[t, -5.6e-178], t$95$1, If[LessEqual[t, -8e-234], t$95$2, If[LessEqual[t, 8.5e-160], t$95$1, N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{x}}{\ell}\\
t_2 := -1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\
\mathbf{if}\;t \leq -8 \cdot 10^{-126}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -5.6 \cdot 10^{-178}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-234}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-160}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -7.9999999999999996e-126 or -5.60000000000000039e-178 < t < -7.9999999999999997e-234Initial program 32.9%
associate-*r/32.8%
fma-neg32.8%
sub-neg32.8%
metadata-eval32.8%
+-commutative32.8%
fma-def32.8%
distribute-rgt-neg-in32.8%
Simplified32.8%
Applied egg-rr77.8%
Taylor expanded in t around -inf 91.2%
mul-1-neg91.2%
sub-neg91.2%
metadata-eval91.2%
Simplified91.2%
Taylor expanded in x around inf 90.3%
associate--l+90.3%
associate-*r/90.3%
metadata-eval90.3%
unpow290.3%
Simplified90.3%
if -7.9999999999999996e-126 < t < -5.60000000000000039e-178 or -7.9999999999999997e-234 < t < 8.49999999999999959e-160Initial program 9.3%
associate-*l/9.4%
Simplified9.4%
Taylor expanded in x around inf 67.5%
associate--l+67.5%
unpow267.5%
distribute-lft-out67.5%
unpow267.5%
unpow267.5%
associate-*r/67.5%
mul-1-neg67.5%
unpow267.5%
fma-udef67.5%
unpow267.5%
Simplified67.5%
Taylor expanded in t around 0 61.7%
cancel-sign-sub-inv61.7%
metadata-eval61.7%
distribute-rgt1-in61.7%
metadata-eval61.7%
unpow261.7%
Simplified61.7%
Taylor expanded in l around 0 51.7%
associate-*l/51.7%
*-lft-identity51.7%
Simplified51.7%
if 8.49999999999999959e-160 < t Initial program 37.4%
associate-*r/37.4%
fma-neg37.4%
sub-neg37.4%
metadata-eval37.4%
+-commutative37.4%
fma-def37.4%
distribute-rgt-neg-in37.4%
Simplified37.4%
Applied egg-rr70.5%
Taylor expanded in t around inf 89.7%
Taylor expanded in x around inf 89.6%
associate--l+89.6%
associate-*r/89.6%
metadata-eval89.6%
unpow289.6%
associate-/r*89.6%
Simplified89.6%
Final simplification81.6%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -2.4e-257) (+ -1.0 (/ 1.0 x)) (if (<= t 1.45e-265) (* t (/ 2.0 (/ (* l l) (* t x)))) (+ 1.0 (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -2.4e-257) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 1.45e-265) {
tmp = t * (2.0 / ((l * l) / (t * x)));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2.4d-257)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 1.45d-265) then
tmp = t * (2.0d0 / ((l * l) / (t * x)))
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2.4e-257) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 1.45e-265) {
tmp = t * (2.0 / ((l * l) / (t * x)));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -2.4e-257: tmp = -1.0 + (1.0 / x) elif t <= 1.45e-265: tmp = t * (2.0 / ((l * l) / (t * x))) else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -2.4e-257) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 1.45e-265) tmp = Float64(t * Float64(2.0 / Float64(Float64(l * l) / Float64(t * x)))); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2.4e-257) tmp = -1.0 + (1.0 / x); elseif (t <= 1.45e-265) tmp = t * (2.0 / ((l * l) / (t * x))); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -2.4e-257], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e-265], N[(t * N[(2.0 / N[(N[(l * l), $MachinePrecision] / N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{-257}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-265}:\\
\;\;\;\;t \cdot \frac{2}{\frac{\ell \cdot \ell}{t \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -2.40000000000000017e-257Initial program 31.4%
associate-*r/31.4%
fma-neg31.4%
sub-neg31.4%
metadata-eval31.4%
+-commutative31.4%
fma-def31.4%
distribute-rgt-neg-in31.4%
Simplified31.4%
Taylor expanded in t around -inf 83.1%
associate-*r*83.1%
neg-mul-183.1%
distribute-rgt-neg-out83.1%
+-commutative83.1%
sub-neg83.1%
metadata-eval83.1%
+-commutative83.1%
Simplified83.1%
Taylor expanded in x around inf 82.1%
if -2.40000000000000017e-257 < t < 1.44999999999999987e-265Initial program 6.4%
associate-*l/6.4%
Simplified6.4%
Taylor expanded in x around inf 60.1%
fma-def60.1%
sub-neg60.1%
unpow260.1%
fma-udef60.1%
unpow260.1%
mul-1-neg60.1%
remove-double-neg60.1%
unpow260.1%
fma-udef60.1%
unpow260.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in l around inf 54.8%
associate-/l*54.8%
unpow254.8%
rem-square-sqrt54.8%
unpow254.8%
Simplified54.8%
if 1.44999999999999987e-265 < t Initial program 31.1%
associate-*r/31.1%
fma-neg31.1%
sub-neg31.1%
metadata-eval31.1%
+-commutative31.1%
fma-def31.1%
distribute-rgt-neg-in31.1%
Simplified31.1%
Applied egg-rr64.4%
Taylor expanded in t around inf 81.3%
Taylor expanded in x around inf 80.8%
Final simplification79.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -5.4e-258)
(+ -1.0 (/ 1.0 x))
(if (<= t 3.4e-265)
(* t (/ 2.0 (/ (* l l) (* t x))))
(+ 1.0 (+ (/ (/ 0.5 x) x) (/ -1.0 x))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5.4e-258) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 3.4e-265) {
tmp = t * (2.0 / ((l * l) / (t * x)));
} else {
tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5.4d-258)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 3.4d-265) then
tmp = t * (2.0d0 / ((l * l) / (t * x)))
else
tmp = 1.0d0 + (((0.5d0 / x) / x) + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5.4e-258) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 3.4e-265) {
tmp = t * (2.0 / ((l * l) / (t * x)));
} else {
tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5.4e-258: tmp = -1.0 + (1.0 / x) elif t <= 3.4e-265: tmp = t * (2.0 / ((l * l) / (t * x))) else: tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5.4e-258) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 3.4e-265) tmp = Float64(t * Float64(2.0 / Float64(Float64(l * l) / Float64(t * x)))); else tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) / x) + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5.4e-258) tmp = -1.0 + (1.0 / x); elseif (t <= 3.4e-265) tmp = t * (2.0 / ((l * l) / (t * x))); else tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -5.4e-258], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-265], N[(t * N[(2.0 / N[(N[(l * l), $MachinePrecision] / N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{-258}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-265}:\\
\;\;\;\;t \cdot \frac{2}{\frac{\ell \cdot \ell}{t \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -5.39999999999999991e-258Initial program 31.4%
associate-*r/31.4%
fma-neg31.4%
sub-neg31.4%
metadata-eval31.4%
+-commutative31.4%
fma-def31.4%
distribute-rgt-neg-in31.4%
Simplified31.4%
Taylor expanded in t around -inf 83.1%
associate-*r*83.1%
neg-mul-183.1%
distribute-rgt-neg-out83.1%
+-commutative83.1%
sub-neg83.1%
metadata-eval83.1%
+-commutative83.1%
Simplified83.1%
Taylor expanded in x around inf 82.1%
if -5.39999999999999991e-258 < t < 3.4000000000000001e-265Initial program 6.4%
associate-*l/6.4%
Simplified6.4%
Taylor expanded in x around inf 60.1%
fma-def60.1%
sub-neg60.1%
unpow260.1%
fma-udef60.1%
unpow260.1%
mul-1-neg60.1%
remove-double-neg60.1%
unpow260.1%
fma-udef60.1%
unpow260.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in l around inf 54.8%
associate-/l*54.8%
unpow254.8%
rem-square-sqrt54.8%
unpow254.8%
Simplified54.8%
if 3.4000000000000001e-265 < t Initial program 31.1%
associate-*r/31.1%
fma-neg31.1%
sub-neg31.1%
metadata-eval31.1%
+-commutative31.1%
fma-def31.1%
distribute-rgt-neg-in31.1%
Simplified31.1%
Applied egg-rr64.4%
Taylor expanded in t around inf 81.3%
Taylor expanded in x around inf 81.2%
associate--l+81.2%
associate-*r/81.2%
metadata-eval81.2%
unpow281.2%
associate-/r*81.2%
Simplified81.2%
Final simplification79.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -1.42e-257)
(- (/ 1.0 x) (+ 1.0 (/ 0.5 (* x x))))
(if (<= t 1.65e-264)
(* t (/ 2.0 (/ (* l l) (* t x))))
(+ 1.0 (+ (/ (/ 0.5 x) x) (/ -1.0 x))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.42e-257) {
tmp = (1.0 / x) - (1.0 + (0.5 / (x * x)));
} else if (t <= 1.65e-264) {
tmp = t * (2.0 / ((l * l) / (t * x)));
} else {
tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.42d-257)) then
tmp = (1.0d0 / x) - (1.0d0 + (0.5d0 / (x * x)))
else if (t <= 1.65d-264) then
tmp = t * (2.0d0 / ((l * l) / (t * x)))
else
tmp = 1.0d0 + (((0.5d0 / x) / x) + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.42e-257) {
tmp = (1.0 / x) - (1.0 + (0.5 / (x * x)));
} else if (t <= 1.65e-264) {
tmp = t * (2.0 / ((l * l) / (t * x)));
} else {
tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.42e-257: tmp = (1.0 / x) - (1.0 + (0.5 / (x * x))) elif t <= 1.65e-264: tmp = t * (2.0 / ((l * l) / (t * x))) else: tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.42e-257) tmp = Float64(Float64(1.0 / x) - Float64(1.0 + Float64(0.5 / Float64(x * x)))); elseif (t <= 1.65e-264) tmp = Float64(t * Float64(2.0 / Float64(Float64(l * l) / Float64(t * x)))); else tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) / x) + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.42e-257) tmp = (1.0 / x) - (1.0 + (0.5 / (x * x))); elseif (t <= 1.65e-264) tmp = t * (2.0 / ((l * l) / (t * x))); else tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1.42e-257], N[(N[(1.0 / x), $MachinePrecision] - N[(1.0 + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e-264], N[(t * N[(2.0 / N[(N[(l * l), $MachinePrecision] / N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.42 \cdot 10^{-257}:\\
\;\;\;\;\frac{1}{x} - \left(1 + \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-264}:\\
\;\;\;\;t \cdot \frac{2}{\frac{\ell \cdot \ell}{t \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -1.41999999999999996e-257Initial program 31.4%
associate-*r/31.4%
fma-neg31.4%
sub-neg31.4%
metadata-eval31.4%
+-commutative31.4%
fma-def31.4%
distribute-rgt-neg-in31.4%
Simplified31.4%
Taylor expanded in t around -inf 83.1%
associate-*r*83.1%
neg-mul-183.1%
distribute-rgt-neg-out83.1%
+-commutative83.1%
sub-neg83.1%
metadata-eval83.1%
+-commutative83.1%
Simplified83.1%
Taylor expanded in x around inf 82.5%
associate-*r/82.5%
metadata-eval82.5%
unpow282.5%
Simplified82.5%
if -1.41999999999999996e-257 < t < 1.65000000000000006e-264Initial program 6.4%
associate-*l/6.4%
Simplified6.4%
Taylor expanded in x around inf 60.1%
fma-def60.1%
sub-neg60.1%
unpow260.1%
fma-udef60.1%
unpow260.1%
mul-1-neg60.1%
remove-double-neg60.1%
unpow260.1%
fma-udef60.1%
unpow260.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in l around inf 54.8%
associate-/l*54.8%
unpow254.8%
rem-square-sqrt54.8%
unpow254.8%
Simplified54.8%
if 1.65000000000000006e-264 < t Initial program 31.1%
associate-*r/31.1%
fma-neg31.1%
sub-neg31.1%
metadata-eval31.1%
+-commutative31.1%
fma-def31.1%
distribute-rgt-neg-in31.1%
Simplified31.1%
Applied egg-rr64.4%
Taylor expanded in t around inf 81.3%
Taylor expanded in x around inf 81.2%
associate--l+81.2%
associate-*r/81.2%
metadata-eval81.2%
unpow281.2%
associate-/r*81.2%
Simplified81.2%
Final simplification79.8%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -3.2e-258)
(+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x))))
(if (<= t 2.05e-265)
(* t (/ 2.0 (/ (* l l) (* t x))))
(+ 1.0 (+ (/ (/ 0.5 x) x) (/ -1.0 x))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -3.2e-258) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else if (t <= 2.05e-265) {
tmp = t * (2.0 / ((l * l) / (t * x)));
} else {
tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-3.2d-258)) then
tmp = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * x)))
else if (t <= 2.05d-265) then
tmp = t * (2.0d0 / ((l * l) / (t * x)))
else
tmp = 1.0d0 + (((0.5d0 / x) / x) + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -3.2e-258) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else if (t <= 2.05e-265) {
tmp = t * (2.0 / ((l * l) / (t * x)));
} else {
tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -3.2e-258: tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))) elif t <= 2.05e-265: tmp = t * (2.0 / ((l * l) / (t * x))) else: tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -3.2e-258) tmp = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * x)))); elseif (t <= 2.05e-265) tmp = Float64(t * Float64(2.0 / Float64(Float64(l * l) / Float64(t * x)))); else tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / x) / x) + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -3.2e-258) tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))); elseif (t <= 2.05e-265) tmp = t * (2.0 / ((l * l) / (t * x))); else tmp = 1.0 + (((0.5 / x) / x) + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -3.2e-258], N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.05e-265], N[(t * N[(2.0 / N[(N[(l * l), $MachinePrecision] / N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-258}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-265}:\\
\;\;\;\;t \cdot \frac{2}{\frac{\ell \cdot \ell}{t \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -3.2000000000000002e-258Initial program 31.4%
associate-*r/31.4%
fma-neg31.4%
sub-neg31.4%
metadata-eval31.4%
+-commutative31.4%
fma-def31.4%
distribute-rgt-neg-in31.4%
Simplified31.4%
Applied egg-rr71.7%
Taylor expanded in t around -inf 83.3%
mul-1-neg83.3%
sub-neg83.3%
metadata-eval83.3%
Simplified83.3%
Taylor expanded in x around inf 82.5%
associate--l+82.5%
associate-*r/82.5%
metadata-eval82.5%
unpow282.5%
Simplified82.5%
if -3.2000000000000002e-258 < t < 2.05e-265Initial program 6.4%
associate-*l/6.4%
Simplified6.4%
Taylor expanded in x around inf 60.1%
fma-def60.1%
sub-neg60.1%
unpow260.1%
fma-udef60.1%
unpow260.1%
mul-1-neg60.1%
remove-double-neg60.1%
unpow260.1%
fma-udef60.1%
unpow260.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in l around inf 54.8%
associate-/l*54.8%
unpow254.8%
rem-square-sqrt54.8%
unpow254.8%
Simplified54.8%
if 2.05e-265 < t Initial program 31.1%
associate-*r/31.1%
fma-neg31.1%
sub-neg31.1%
metadata-eval31.1%
+-commutative31.1%
fma-def31.1%
distribute-rgt-neg-in31.1%
Simplified31.1%
Applied egg-rr64.4%
Taylor expanded in t around inf 81.3%
Taylor expanded in x around inf 81.2%
associate--l+81.2%
associate-*r/81.2%
metadata-eval81.2%
unpow281.2%
associate-/r*81.2%
Simplified81.2%
Final simplification79.8%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -2.6e-307) -1.0 (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -2.6e-307) {
tmp = -1.0;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2.6d-307)) then
tmp = -1.0d0
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2.6e-307) {
tmp = -1.0;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -2.6e-307: tmp = -1.0 else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -2.6e-307) tmp = -1.0; else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2.6e-307) tmp = -1.0; else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -2.6e-307], -1.0, N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{-307}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -2.59999999999999996e-307Initial program 29.4%
associate-*r/29.4%
fma-neg29.4%
sub-neg29.4%
metadata-eval29.4%
+-commutative29.4%
fma-def29.4%
distribute-rgt-neg-in29.4%
Simplified29.4%
Applied egg-rr70.1%
Taylor expanded in t around inf 1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt77.8%
Simplified77.8%
if -2.59999999999999996e-307 < t Initial program 29.3%
associate-*r/29.2%
fma-neg29.2%
sub-neg29.2%
metadata-eval29.2%
+-commutative29.2%
fma-def29.2%
distribute-rgt-neg-in29.2%
Simplified29.2%
Applied egg-rr65.0%
Taylor expanded in t around inf 75.2%
Taylor expanded in x around inf 74.8%
Final simplification76.3%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -2.6e-307) (+ -1.0 (/ 1.0 x)) (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -2.6e-307) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2.6d-307)) then
tmp = (-1.0d0) + (1.0d0 / x)
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2.6e-307) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -2.6e-307: tmp = -1.0 + (1.0 / x) else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -2.6e-307) tmp = Float64(-1.0 + Float64(1.0 / x)); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2.6e-307) tmp = -1.0 + (1.0 / x); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -2.6e-307], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{-307}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -2.59999999999999996e-307Initial program 29.4%
associate-*r/29.4%
fma-neg29.4%
sub-neg29.4%
metadata-eval29.4%
+-commutative29.4%
fma-def29.4%
distribute-rgt-neg-in29.4%
Simplified29.4%
Taylor expanded in t around -inf 79.2%
associate-*r*79.2%
neg-mul-179.2%
distribute-rgt-neg-out79.2%
+-commutative79.2%
sub-neg79.2%
metadata-eval79.2%
+-commutative79.2%
Simplified79.2%
Taylor expanded in x around inf 78.2%
if -2.59999999999999996e-307 < t Initial program 29.3%
associate-*r/29.2%
fma-neg29.2%
sub-neg29.2%
metadata-eval29.2%
+-commutative29.2%
fma-def29.2%
distribute-rgt-neg-in29.2%
Simplified29.2%
Applied egg-rr65.0%
Taylor expanded in t around inf 75.2%
Taylor expanded in x around inf 74.8%
Final simplification76.6%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -2.6e-307) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -2.6e-307) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2.6d-307)) then
tmp = -1.0d0
else
tmp = 1.0d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2.6e-307) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -2.6e-307: tmp = -1.0 else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -2.6e-307) tmp = -1.0; else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2.6e-307) tmp = -1.0; else tmp = 1.0; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -2.6e-307], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{-307}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -2.59999999999999996e-307Initial program 29.4%
associate-*r/29.4%
fma-neg29.4%
sub-neg29.4%
metadata-eval29.4%
+-commutative29.4%
fma-def29.4%
distribute-rgt-neg-in29.4%
Simplified29.4%
Applied egg-rr70.1%
Taylor expanded in t around inf 1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt77.8%
Simplified77.8%
if -2.59999999999999996e-307 < t Initial program 29.3%
associate-*l/29.3%
Simplified29.3%
Taylor expanded in x around inf 56.1%
fma-def56.1%
sub-neg56.1%
unpow256.1%
fma-udef56.1%
unpow256.1%
mul-1-neg56.1%
remove-double-neg56.1%
unpow256.1%
fma-udef56.1%
unpow256.1%
*-commutative56.1%
Simplified56.1%
Taylor expanded in x around inf 73.4%
Taylor expanded in t around 0 73.6%
Final simplification75.7%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 -1.0)
l = abs(l);
double code(double x, double l, double t) {
return -1.0;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = -1.0d0
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
return -1.0;
}
l = abs(l) def code(x, l, t): return -1.0
l = abs(l) function code(x, l, t) return -1.0 end
l = abs(l) function tmp = code(x, l, t) tmp = -1.0; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := -1.0
\begin{array}{l}
l = |l|\\
\\
-1
\end{array}
Initial program 29.3%
associate-*r/29.3%
fma-neg29.3%
sub-neg29.3%
metadata-eval29.3%
+-commutative29.3%
fma-def29.3%
distribute-rgt-neg-in29.3%
Simplified29.3%
Applied egg-rr67.6%
Taylor expanded in t around inf 37.0%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt41.3%
Simplified41.3%
Final simplification41.3%
herbie shell --seed 2023258
(FPCore (x l t)
:name "Toniolo and Linder, Equation (7)"
:precision binary64
(/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))