
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -5e-272)
t_1
(if (<= t_1 5e-180)
(fma (/ (- t x) z) (- a y) t)
(fma (/ (- y z) (- a z)) (- t x) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -5e-272) {
tmp = t_1;
} else if (t_1 <= 5e-180) {
tmp = fma(((t - x) / z), (a - y), t);
} else {
tmp = fma(((y - z) / (a - z)), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= -5e-272) tmp = t_1; elseif (t_1 <= 5e-180) tmp = fma(Float64(Float64(t - x) / z), Float64(a - y), t); else tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-272], t$95$1, If[LessEqual[t$95$1, 5e-180], N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision] + t), $MachinePrecision], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-272}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-180}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{z}, a - y, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999982e-272Initial program 97.0%
if -4.99999999999999982e-272 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.0000000000000001e-180Initial program 6.3%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites97.4%
if 5.0000000000000001e-180 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6495.5
Applied rewrites95.5%
Final simplification96.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- t x) (/ y (- a z))))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z)))))
(t_3 (fma (- y z) (/ t (- a z)) x)))
(if (<= t_2 -4e+267)
t_1
(if (<= t_2 -5e-272)
t_3
(if (<= t_2 0.0)
(/ (* x (- y a)) z)
(if (<= t_2 1e-177)
(* t (/ (- y z) (- a z)))
(if (<= t_2 2e+304) t_3 t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) * (y / (a - z));
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double t_3 = fma((y - z), (t / (a - z)), x);
double tmp;
if (t_2 <= -4e+267) {
tmp = t_1;
} else if (t_2 <= -5e-272) {
tmp = t_3;
} else if (t_2 <= 0.0) {
tmp = (x * (y - a)) / z;
} else if (t_2 <= 1e-177) {
tmp = t * ((y - z) / (a - z));
} else if (t_2 <= 2e+304) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) * Float64(y / Float64(a - z))) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) t_3 = fma(Float64(y - z), Float64(t / Float64(a - z)), x) tmp = 0.0 if (t_2 <= -4e+267) tmp = t_1; elseif (t_2 <= -5e-272) tmp = t_3; elseif (t_2 <= 0.0) tmp = Float64(Float64(x * Float64(y - a)) / z); elseif (t_2 <= 1e-177) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (t_2 <= 2e+304) tmp = t_3; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+267], t$95$1, If[LessEqual[t$95$2, -5e-272], t$95$3, If[LessEqual[t$95$2, 0.0], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 1e-177], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+304], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_3 := \mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{+267}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-272}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 10^{-177}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -3.9999999999999999e267 or 1.9999999999999999e304 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.8%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6481.9
Applied rewrites81.9%
Applied rewrites92.3%
if -3.9999999999999999e267 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999982e-272 or 9.99999999999999952e-178 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.9999999999999999e304Initial program 96.3%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift--.f6482.9
Applied rewrites82.9%
if -4.99999999999999982e-272 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.6%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f644.4
Applied rewrites4.4%
Taylor expanded in y around 0
Applied rewrites4.4%
Taylor expanded in z around -inf
Applied rewrites64.8%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999952e-178Initial program 30.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6474.4
Applied rewrites74.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6499.6
Applied rewrites99.6%
Applied rewrites99.8%
Final simplification82.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- t x) (/ y (- a z))))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z)))))
(t_3 (fma (- y z) (/ t (- a z)) x)))
(if (<= t_2 -4e+267)
t_1
(if (<= t_2 -5e-272)
t_3
(if (<= t_2 5e-180)
(fma (/ (- t x) z) (- a y) t)
(if (<= t_2 2e+304) t_3 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) * (y / (a - z));
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double t_3 = fma((y - z), (t / (a - z)), x);
double tmp;
if (t_2 <= -4e+267) {
tmp = t_1;
} else if (t_2 <= -5e-272) {
tmp = t_3;
} else if (t_2 <= 5e-180) {
tmp = fma(((t - x) / z), (a - y), t);
} else if (t_2 <= 2e+304) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) * Float64(y / Float64(a - z))) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) t_3 = fma(Float64(y - z), Float64(t / Float64(a - z)), x) tmp = 0.0 if (t_2 <= -4e+267) tmp = t_1; elseif (t_2 <= -5e-272) tmp = t_3; elseif (t_2 <= 5e-180) tmp = fma(Float64(Float64(t - x) / z), Float64(a - y), t); elseif (t_2 <= 2e+304) tmp = t_3; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+267], t$95$1, If[LessEqual[t$95$2, -5e-272], t$95$3, If[LessEqual[t$95$2, 5e-180], N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[t$95$2, 2e+304], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_3 := \mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{+267}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-272}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-180}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{z}, a - y, t\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -3.9999999999999999e267 or 1.9999999999999999e304 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.8%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6481.9
Applied rewrites81.9%
Applied rewrites92.3%
if -3.9999999999999999e267 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999982e-272 or 5.0000000000000001e-180 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.9999999999999999e304Initial program 96.2%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6483.0
Applied rewrites83.0%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift--.f6483.0
Applied rewrites83.0%
if -4.99999999999999982e-272 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.0000000000000001e-180Initial program 6.3%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites97.4%
Final simplification87.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) (- a z)) (- t x) x))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_2 -5e-272)
t_1
(if (<= t_2 5e-180) (fma (/ (- t x) z) (- a y) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / (a - z)), (t - x), x);
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -5e-272) {
tmp = t_1;
} else if (t_2 <= 5e-180) {
tmp = fma(((t - x) / z), (a - y), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_2 <= -5e-272) tmp = t_1; elseif (t_2 <= 5e-180) tmp = fma(Float64(Float64(t - x) / z), Float64(a - y), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-272], t$95$1, If[LessEqual[t$95$2, 5e-180], N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-272}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-180}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{z}, a - y, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999982e-272 or 5.0000000000000001e-180 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 94.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6495.4
Applied rewrites95.4%
if -4.99999999999999982e-272 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.0000000000000001e-180Initial program 6.3%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites97.4%
Final simplification95.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -50.0)
t_1
(if (<= z 4.55e+18)
(fma (/ (- y z) a) (- t x) x)
(if (<= z 4.2e+95) (/ (* x (- y a)) z) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -50.0) {
tmp = t_1;
} else if (z <= 4.55e+18) {
tmp = fma(((y - z) / a), (t - x), x);
} else if (z <= 4.2e+95) {
tmp = (x * (y - a)) / z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -50.0) tmp = t_1; elseif (z <= 4.55e+18) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); elseif (z <= 4.2e+95) tmp = Float64(Float64(x * Float64(y - a)) / z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -50.0], t$95$1, If[LessEqual[z, 4.55e+18], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 4.2e+95], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -50:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.55 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+95}:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -50 or 4.2e95 < z Initial program 69.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6472.2
Applied rewrites72.2%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6447.8
Applied rewrites47.8%
Applied rewrites64.7%
if -50 < z < 4.55e18Initial program 92.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6493.7
Applied rewrites93.7%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6483.0
Applied rewrites83.0%
if 4.55e18 < z < 4.2e95Initial program 54.6%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f6432.6
Applied rewrites32.6%
Taylor expanded in y around 0
Applied rewrites10.0%
Taylor expanded in z around -inf
Applied rewrites63.1%
Final simplification74.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -50.0)
t_1
(if (<= z 5.2e+18)
(fma (- y z) (/ (- t x) a) x)
(if (<= z 4.2e+95) (/ (* x (- y a)) z) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -50.0) {
tmp = t_1;
} else if (z <= 5.2e+18) {
tmp = fma((y - z), ((t - x) / a), x);
} else if (z <= 4.2e+95) {
tmp = (x * (y - a)) / z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -50.0) tmp = t_1; elseif (z <= 5.2e+18) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); elseif (z <= 4.2e+95) tmp = Float64(Float64(x * Float64(y - a)) / z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -50.0], t$95$1, If[LessEqual[z, 5.2e+18], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 4.2e+95], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -50:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+95}:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -50 or 4.2e95 < z Initial program 69.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6472.2
Applied rewrites72.2%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6447.8
Applied rewrites47.8%
Applied rewrites64.7%
if -50 < z < 5.2e18Initial program 92.4%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6481.2
Applied rewrites81.2%
if 5.2e18 < z < 4.2e95Initial program 54.6%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f6432.6
Applied rewrites32.6%
Taylor expanded in y around 0
Applied rewrites10.0%
Taylor expanded in z around -inf
Applied rewrites63.1%
Final simplification73.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -0.00062)
t_1
(if (<= z 32500000000000.0)
(fma (/ y a) (- t x) x)
(if (<= z 4.2e+95) (/ (* x (- y a)) z) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -0.00062) {
tmp = t_1;
} else if (z <= 32500000000000.0) {
tmp = fma((y / a), (t - x), x);
} else if (z <= 4.2e+95) {
tmp = (x * (y - a)) / z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -0.00062) tmp = t_1; elseif (z <= 32500000000000.0) tmp = fma(Float64(y / a), Float64(t - x), x); elseif (z <= 4.2e+95) tmp = Float64(Float64(x * Float64(y - a)) / z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.00062], t$95$1, If[LessEqual[z, 32500000000000.0], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 4.2e+95], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -0.00062:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 32500000000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+95}:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.2e-4 or 4.2e95 < z Initial program 69.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6472.5
Applied rewrites72.5%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6448.4
Applied rewrites48.4%
Applied rewrites65.1%
if -6.2e-4 < z < 3.25e13Initial program 92.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6493.6
Applied rewrites93.6%
Taylor expanded in z around 0
lower-/.f6479.5
Applied rewrites79.5%
if 3.25e13 < z < 4.2e95Initial program 57.2%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f6430.9
Applied rewrites30.9%
Taylor expanded in y around 0
Applied rewrites9.5%
Taylor expanded in z around -inf
Applied rewrites60.4%
Final simplification72.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- y z) (/ t (- a z)))))
(if (<= z -0.00062)
t_1
(if (<= z 32500000000000.0)
(fma (/ y a) (- t x) x)
(if (<= z 1.35e+96) (/ (* x (- y a)) z) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) * (t / (a - z));
double tmp;
if (z <= -0.00062) {
tmp = t_1;
} else if (z <= 32500000000000.0) {
tmp = fma((y / a), (t - x), x);
} else if (z <= 1.35e+96) {
tmp = (x * (y - a)) / z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(y - z) * Float64(t / Float64(a - z))) tmp = 0.0 if (z <= -0.00062) tmp = t_1; elseif (z <= 32500000000000.0) tmp = fma(Float64(y / a), Float64(t - x), x); elseif (z <= 1.35e+96) tmp = Float64(Float64(x * Float64(y - a)) / z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.00062], t$95$1, If[LessEqual[z, 32500000000000.0], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.35e+96], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{if}\;z \leq -0.00062:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 32500000000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+96}:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.2e-4 or 1.35000000000000011e96 < z Initial program 69.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6472.5
Applied rewrites72.5%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6448.4
Applied rewrites48.4%
Applied rewrites56.7%
if -6.2e-4 < z < 3.25e13Initial program 92.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6493.6
Applied rewrites93.6%
Taylor expanded in z around 0
lower-/.f6479.5
Applied rewrites79.5%
if 3.25e13 < z < 1.35000000000000011e96Initial program 57.2%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f6430.9
Applied rewrites30.9%
Taylor expanded in y around 0
Applied rewrites9.5%
Taylor expanded in z around -inf
Applied rewrites60.4%
Final simplification69.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ t a) x)))
(if (<= a -4.3e+76)
t_1
(if (<= a -9.4e-82)
(* (- t x) (/ y (- a z)))
(if (<= a 1.4e-86) (/ (* (- y z) t) (- a z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), (t / a), x);
double tmp;
if (a <= -4.3e+76) {
tmp = t_1;
} else if (a <= -9.4e-82) {
tmp = (t - x) * (y / (a - z));
} else if (a <= 1.4e-86) {
tmp = ((y - z) * t) / (a - z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(t / a), x) tmp = 0.0 if (a <= -4.3e+76) tmp = t_1; elseif (a <= -9.4e-82) tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z))); elseif (a <= 1.4e-86) tmp = Float64(Float64(Float64(y - z) * t) / Float64(a - z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -4.3e+76], t$95$1, If[LessEqual[a, -9.4e-82], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.4e-86], N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\
\mathbf{if}\;a \leq -4.3 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -9.4 \cdot 10^{-82}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-86}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -4.29999999999999978e76 or 1.40000000000000005e-86 < a Initial program 89.4%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift--.f6482.9
Applied rewrites82.9%
Taylor expanded in a around inf
Applied rewrites74.3%
if -4.29999999999999978e76 < a < -9.4000000000000001e-82Initial program 82.8%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6457.0
Applied rewrites57.0%
Applied rewrites66.3%
if -9.4000000000000001e-82 < a < 1.40000000000000005e-86Initial program 69.7%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6461.5
Applied rewrites61.5%
Final simplification68.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ t a) x)))
(if (<= a -4.3e+76)
t_1
(if (<= a -2.25e-108)
(* y (/ (- t x) (- a z)))
(if (<= a 1.1e-87) (/ (* (- y z) t) (- z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), (t / a), x);
double tmp;
if (a <= -4.3e+76) {
tmp = t_1;
} else if (a <= -2.25e-108) {
tmp = y * ((t - x) / (a - z));
} else if (a <= 1.1e-87) {
tmp = ((y - z) * t) / -z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(t / a), x) tmp = 0.0 if (a <= -4.3e+76) tmp = t_1; elseif (a <= -2.25e-108) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (a <= 1.1e-87) tmp = Float64(Float64(Float64(y - z) * t) / Float64(-z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -4.3e+76], t$95$1, If[LessEqual[a, -2.25e-108], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e-87], N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / (-z)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\
\mathbf{if}\;a \leq -4.3 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.25 \cdot 10^{-108}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-87}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot t}{-z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -4.29999999999999978e76 or 1.09999999999999994e-87 < a Initial program 89.4%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift--.f6482.9
Applied rewrites82.9%
Taylor expanded in a around inf
Applied rewrites74.3%
if -4.29999999999999978e76 < a < -2.24999999999999985e-108Initial program 77.6%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6455.8
Applied rewrites55.8%
Applied rewrites63.5%
if -2.24999999999999985e-108 < a < 1.09999999999999994e-87Initial program 70.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6472.4
Applied rewrites72.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6461.8
Applied rewrites61.8%
Taylor expanded in a around 0
Applied rewrites60.0%
Final simplification67.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ t a) x)))
(if (<= a -4.3e+76)
t_1
(if (<= a -2.25e-108)
(* (- t x) (/ y (- a z)))
(if (<= a 1.1e-87) (/ (* (- y z) t) (- z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), (t / a), x);
double tmp;
if (a <= -4.3e+76) {
tmp = t_1;
} else if (a <= -2.25e-108) {
tmp = (t - x) * (y / (a - z));
} else if (a <= 1.1e-87) {
tmp = ((y - z) * t) / -z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(t / a), x) tmp = 0.0 if (a <= -4.3e+76) tmp = t_1; elseif (a <= -2.25e-108) tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z))); elseif (a <= 1.1e-87) tmp = Float64(Float64(Float64(y - z) * t) / Float64(-z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -4.3e+76], t$95$1, If[LessEqual[a, -2.25e-108], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e-87], N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / (-z)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\
\mathbf{if}\;a \leq -4.3 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.25 \cdot 10^{-108}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-87}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot t}{-z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -4.29999999999999978e76 or 1.09999999999999994e-87 < a Initial program 89.4%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift--.f6482.9
Applied rewrites82.9%
Taylor expanded in a around inf
Applied rewrites74.3%
if -4.29999999999999978e76 < a < -2.24999999999999985e-108Initial program 77.6%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6455.8
Applied rewrites55.8%
Applied rewrites63.5%
if -2.24999999999999985e-108 < a < 1.09999999999999994e-87Initial program 70.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6472.4
Applied rewrites72.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6461.8
Applied rewrites61.8%
Taylor expanded in a around 0
Applied rewrites60.0%
Final simplification67.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ t a) x)))
(if (<= a -3.1e-43)
t_1
(if (<= a -1.2e-104)
(/ (* y (- x)) (- a z))
(if (<= a 1.1e-87) (/ (* (- y z) t) (- z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), (t / a), x);
double tmp;
if (a <= -3.1e-43) {
tmp = t_1;
} else if (a <= -1.2e-104) {
tmp = (y * -x) / (a - z);
} else if (a <= 1.1e-87) {
tmp = ((y - z) * t) / -z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(t / a), x) tmp = 0.0 if (a <= -3.1e-43) tmp = t_1; elseif (a <= -1.2e-104) tmp = Float64(Float64(y * Float64(-x)) / Float64(a - z)); elseif (a <= 1.1e-87) tmp = Float64(Float64(Float64(y - z) * t) / Float64(-z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.1e-43], t$95$1, If[LessEqual[a, -1.2e-104], N[(N[(y * (-x)), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e-87], N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / (-z)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.2 \cdot 10^{-104}:\\
\;\;\;\;\frac{y \cdot \left(-x\right)}{a - z}\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-87}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot t}{-z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.0999999999999999e-43 or 1.09999999999999994e-87 < a Initial program 88.6%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6480.7
Applied rewrites80.7%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift--.f6480.7
Applied rewrites80.7%
Taylor expanded in a around inf
Applied rewrites70.9%
if -3.0999999999999999e-43 < a < -1.2e-104Initial program 74.1%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6473.5
Applied rewrites73.5%
Taylor expanded in t around 0
Applied rewrites73.6%
if -1.2e-104 < a < 1.09999999999999994e-87Initial program 70.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6472.4
Applied rewrites72.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6461.8
Applied rewrites61.8%
Taylor expanded in a around 0
Applied rewrites60.0%
Final simplification66.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ t a) x)))
(if (<= a -3.1e-43)
t_1
(if (<= a -2.35e-104)
(/ (* y (- x)) (- a z))
(if (<= a 1.25e-87) (* (- y z) (/ t (- z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), (t / a), x);
double tmp;
if (a <= -3.1e-43) {
tmp = t_1;
} else if (a <= -2.35e-104) {
tmp = (y * -x) / (a - z);
} else if (a <= 1.25e-87) {
tmp = (y - z) * (t / -z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(t / a), x) tmp = 0.0 if (a <= -3.1e-43) tmp = t_1; elseif (a <= -2.35e-104) tmp = Float64(Float64(y * Float64(-x)) / Float64(a - z)); elseif (a <= 1.25e-87) tmp = Float64(Float64(y - z) * Float64(t / Float64(-z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.1e-43], t$95$1, If[LessEqual[a, -2.35e-104], N[(N[(y * (-x)), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-87], N[(N[(y - z), $MachinePrecision] * N[(t / (-z)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.35 \cdot 10^{-104}:\\
\;\;\;\;\frac{y \cdot \left(-x\right)}{a - z}\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-87}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{-z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.0999999999999999e-43 or 1.25000000000000011e-87 < a Initial program 88.6%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6480.7
Applied rewrites80.7%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift--.f6480.7
Applied rewrites80.7%
Taylor expanded in a around inf
Applied rewrites70.9%
if -3.0999999999999999e-43 < a < -2.35e-104Initial program 74.1%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6473.5
Applied rewrites73.5%
Taylor expanded in t around 0
Applied rewrites73.6%
if -2.35e-104 < a < 1.25000000000000011e-87Initial program 70.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6472.4
Applied rewrites72.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6461.8
Applied rewrites61.8%
Taylor expanded in a around 0
Applied rewrites60.0%
Applied rewrites56.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ t a) x)))
(if (<= a -2.1e-19)
t_1
(if (<= a 3.1e-236)
(/ (* y (- t x)) (- z))
(if (<= a 1.25e-98) (/ (* y (- x)) (- a z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), (t / a), x);
double tmp;
if (a <= -2.1e-19) {
tmp = t_1;
} else if (a <= 3.1e-236) {
tmp = (y * (t - x)) / -z;
} else if (a <= 1.25e-98) {
tmp = (y * -x) / (a - z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(t / a), x) tmp = 0.0 if (a <= -2.1e-19) tmp = t_1; elseif (a <= 3.1e-236) tmp = Float64(Float64(y * Float64(t - x)) / Float64(-z)); elseif (a <= 1.25e-98) tmp = Float64(Float64(y * Float64(-x)) / Float64(a - z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.1e-19], t$95$1, If[LessEqual[a, 3.1e-236], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[a, 1.25e-98], N[(N[(y * (-x)), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\
\mathbf{if}\;a \leq -2.1 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-236}:\\
\;\;\;\;\frac{y \cdot \left(t - x\right)}{-z}\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-98}:\\
\;\;\;\;\frac{y \cdot \left(-x\right)}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.0999999999999999e-19 or 1.25000000000000005e-98 < a Initial program 88.6%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6481.2
Applied rewrites81.2%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift--.f6481.2
Applied rewrites81.2%
Taylor expanded in a around inf
Applied rewrites70.7%
if -2.0999999999999999e-19 < a < 3.0999999999999998e-236Initial program 72.1%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6459.7
Applied rewrites59.7%
Taylor expanded in a around 0
Applied rewrites52.6%
if 3.0999999999999998e-236 < a < 1.25000000000000005e-98Initial program 68.4%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6455.3
Applied rewrites55.3%
Taylor expanded in t around 0
Applied rewrites48.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.2e+29)
(/ (* t (- z)) (- z))
(if (<= z 700000000.0)
(fma (/ y a) (- t x) x)
(if (<= z 1e+167) (fma (- y z) (/ t a) x) (+ x (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.2e+29) {
tmp = (t * -z) / -z;
} else if (z <= 700000000.0) {
tmp = fma((y / a), (t - x), x);
} else if (z <= 1e+167) {
tmp = fma((y - z), (t / a), x);
} else {
tmp = x + (t - x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.2e+29) tmp = Float64(Float64(t * Float64(-z)) / Float64(-z)); elseif (z <= 700000000.0) tmp = fma(Float64(y / a), Float64(t - x), x); elseif (z <= 1e+167) tmp = fma(Float64(y - z), Float64(t / a), x); else tmp = Float64(x + Float64(t - x)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.2e+29], N[(N[(t * (-z)), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 700000000.0], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1e+167], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+29}:\\
\;\;\;\;\frac{t \cdot \left(-z\right)}{-z}\\
\mathbf{elif}\;z \leq 700000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 10^{+167}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right)\\
\end{array}
\end{array}
if z < -5.2e29Initial program 69.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6470.9
Applied rewrites70.9%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6459.5
Applied rewrites59.5%
Taylor expanded in a around 0
Applied rewrites52.5%
Taylor expanded in y around 0
Applied rewrites48.1%
if -5.2e29 < z < 7e8Initial program 92.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6493.8
Applied rewrites93.8%
Taylor expanded in z around 0
lower-/.f6477.5
Applied rewrites77.5%
if 7e8 < z < 1e167Initial program 70.1%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6453.8
Applied rewrites53.8%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift--.f6453.8
Applied rewrites53.8%
Taylor expanded in a around inf
Applied rewrites33.9%
if 1e167 < z Initial program 53.5%
Taylor expanded in z around inf
lower--.f6438.5
Applied rewrites38.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- t x))))
(if (<= z -3e+28)
t_1
(if (<= z 1050.0)
(- x (/ (* x y) a))
(if (<= z 1.35e+98) (/ (* x y) z) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -3e+28) {
tmp = t_1;
} else if (z <= 1050.0) {
tmp = x - ((x * y) / a);
} else if (z <= 1.35e+98) {
tmp = (x * y) / z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (t - x)
if (z <= (-3d+28)) then
tmp = t_1
else if (z <= 1050.0d0) then
tmp = x - ((x * y) / a)
else if (z <= 1.35d+98) then
tmp = (x * y) / z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -3e+28) {
tmp = t_1;
} else if (z <= 1050.0) {
tmp = x - ((x * y) / a);
} else if (z <= 1.35e+98) {
tmp = (x * y) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t - x) tmp = 0 if z <= -3e+28: tmp = t_1 elif z <= 1050.0: tmp = x - ((x * y) / a) elif z <= 1.35e+98: tmp = (x * y) / z else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t - x)) tmp = 0.0 if (z <= -3e+28) tmp = t_1; elseif (z <= 1050.0) tmp = Float64(x - Float64(Float64(x * y) / a)); elseif (z <= 1.35e+98) tmp = Float64(Float64(x * y) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t - x); tmp = 0.0; if (z <= -3e+28) tmp = t_1; elseif (z <= 1050.0) tmp = x - ((x * y) / a); elseif (z <= 1.35e+98) tmp = (x * y) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+28], t$95$1, If[LessEqual[z, 1050.0], N[(x - N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+98], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right)\\
\mathbf{if}\;z \leq -3 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1050:\\
\;\;\;\;x - \frac{x \cdot y}{a}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+98}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.0000000000000001e28 or 1.35e98 < z Initial program 67.5%
Taylor expanded in z around inf
lower--.f6437.0
Applied rewrites37.0%
if -3.0000000000000001e28 < z < 1050Initial program 93.1%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f6460.7
Applied rewrites60.7%
Taylor expanded in y around 0
Applied rewrites43.4%
Taylor expanded in z around 0
Applied rewrites56.5%
if 1050 < z < 1.35e98Initial program 59.8%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f6430.2
Applied rewrites30.2%
Taylor expanded in a around 0
Applied rewrites32.9%
Final simplification47.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- t x))))
(if (<= z -1e-17)
t_1
(if (<= z 34000.0)
(* t (/ y a))
(if (<= z 1.35e+98) (/ (* x y) z) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -1e-17) {
tmp = t_1;
} else if (z <= 34000.0) {
tmp = t * (y / a);
} else if (z <= 1.35e+98) {
tmp = (x * y) / z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (t - x)
if (z <= (-1d-17)) then
tmp = t_1
else if (z <= 34000.0d0) then
tmp = t * (y / a)
else if (z <= 1.35d+98) then
tmp = (x * y) / z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -1e-17) {
tmp = t_1;
} else if (z <= 34000.0) {
tmp = t * (y / a);
} else if (z <= 1.35e+98) {
tmp = (x * y) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t - x) tmp = 0 if z <= -1e-17: tmp = t_1 elif z <= 34000.0: tmp = t * (y / a) elif z <= 1.35e+98: tmp = (x * y) / z else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t - x)) tmp = 0.0 if (z <= -1e-17) tmp = t_1; elseif (z <= 34000.0) tmp = Float64(t * Float64(y / a)); elseif (z <= 1.35e+98) tmp = Float64(Float64(x * y) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t - x); tmp = 0.0; if (z <= -1e-17) tmp = t_1; elseif (z <= 34000.0) tmp = t * (y / a); elseif (z <= 1.35e+98) tmp = (x * y) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e-17], t$95$1, If[LessEqual[z, 34000.0], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+98], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 34000:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+98}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.00000000000000007e-17 or 1.35e98 < z Initial program 70.2%
Taylor expanded in z around inf
lower--.f6435.6
Applied rewrites35.6%
if -1.00000000000000007e-17 < z < 34000Initial program 92.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6494.2
Applied rewrites94.2%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6437.4
Applied rewrites37.4%
Taylor expanded in z around 0
Applied rewrites26.6%
Applied rewrites31.4%
if 34000 < z < 1.35e98Initial program 58.0%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f6431.6
Applied rewrites31.6%
Taylor expanded in a around 0
Applied rewrites34.0%
Final simplification33.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.2e+29) (/ (* t (- z)) (- z)) (if (<= z 3.9e+179) (fma (/ y a) (- t x) x) (+ x (- t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.2e+29) {
tmp = (t * -z) / -z;
} else if (z <= 3.9e+179) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = x + (t - x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.2e+29) tmp = Float64(Float64(t * Float64(-z)) / Float64(-z)); elseif (z <= 3.9e+179) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = Float64(x + Float64(t - x)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.2e+29], N[(N[(t * (-z)), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 3.9e+179], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+29}:\\
\;\;\;\;\frac{t \cdot \left(-z\right)}{-z}\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+179}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right)\\
\end{array}
\end{array}
if z < -5.2e29Initial program 69.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6470.9
Applied rewrites70.9%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6459.5
Applied rewrites59.5%
Taylor expanded in a around 0
Applied rewrites52.5%
Taylor expanded in y around 0
Applied rewrites48.1%
if -5.2e29 < z < 3.89999999999999974e179Initial program 87.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6489.2
Applied rewrites89.2%
Taylor expanded in z around 0
lower-/.f6466.3
Applied rewrites66.3%
if 3.89999999999999974e179 < z Initial program 53.5%
Taylor expanded in z around inf
lower--.f6437.0
Applied rewrites37.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.2e+29) (/ (* t (- z)) (- z)) (if (<= z 3.9e+179) (fma y (/ (- t x) a) x) (+ x (- t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.2e+29) {
tmp = (t * -z) / -z;
} else if (z <= 3.9e+179) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = x + (t - x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.2e+29) tmp = Float64(Float64(t * Float64(-z)) / Float64(-z)); elseif (z <= 3.9e+179) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = Float64(x + Float64(t - x)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.2e+29], N[(N[(t * (-z)), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 3.9e+179], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+29}:\\
\;\;\;\;\frac{t \cdot \left(-z\right)}{-z}\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+179}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right)\\
\end{array}
\end{array}
if z < -5.2e29Initial program 69.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6470.9
Applied rewrites70.9%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6459.5
Applied rewrites59.5%
Taylor expanded in a around 0
Applied rewrites52.5%
Taylor expanded in y around 0
Applied rewrites48.1%
if -5.2e29 < z < 3.89999999999999974e179Initial program 87.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6464.8
Applied rewrites64.8%
if 3.89999999999999974e179 < z Initial program 53.5%
Taylor expanded in z around inf
lower--.f6437.0
Applied rewrites37.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (- t x)))) (if (<= z -3.8e+128) t_1 (if (<= z 3.9e+179) (fma y (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -3.8e+128) {
tmp = t_1;
} else if (z <= 3.9e+179) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t - x)) tmp = 0.0 if (z <= -3.8e+128) tmp = t_1; elseif (z <= 3.9e+179) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+128], t$95$1, If[LessEqual[z, 3.9e+179], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right)\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+179}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.7999999999999999e128 or 3.89999999999999974e179 < z Initial program 55.9%
Taylor expanded in z around inf
lower--.f6444.0
Applied rewrites44.0%
if -3.7999999999999999e128 < z < 3.89999999999999974e179Initial program 86.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6460.9
Applied rewrites60.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (- t x)))) (if (<= z -3e+28) t_1 (if (<= z 6.8e+40) (fma (- x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -3e+28) {
tmp = t_1;
} else if (z <= 6.8e+40) {
tmp = fma(-x, (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t - x)) tmp = 0.0 if (z <= -3e+28) tmp = t_1; elseif (z <= 6.8e+40) tmp = fma(Float64(-x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+28], t$95$1, If[LessEqual[z, 6.8e+40], N[((-x) * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right)\\
\mathbf{if}\;z \leq -3 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(-x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.0000000000000001e28 or 6.79999999999999977e40 < z Initial program 65.9%
Taylor expanded in z around inf
lower--.f6434.7
Applied rewrites34.7%
if -3.0000000000000001e28 < z < 6.79999999999999977e40Initial program 91.6%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f6459.1
Applied rewrites59.1%
Taylor expanded in z around 0
Applied rewrites56.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (- t x)))) (if (<= z -1e-17) t_1 (if (<= z 3.5e+27) (* t (/ y a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -1e-17) {
tmp = t_1;
} else if (z <= 3.5e+27) {
tmp = t * (y / a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (t - x)
if (z <= (-1d-17)) then
tmp = t_1
else if (z <= 3.5d+27) then
tmp = t * (y / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -1e-17) {
tmp = t_1;
} else if (z <= 3.5e+27) {
tmp = t * (y / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t - x) tmp = 0 if z <= -1e-17: tmp = t_1 elif z <= 3.5e+27: tmp = t * (y / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t - x)) tmp = 0.0 if (z <= -1e-17) tmp = t_1; elseif (z <= 3.5e+27) tmp = Float64(t * Float64(y / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t - x); tmp = 0.0; if (z <= -1e-17) tmp = t_1; elseif (z <= 3.5e+27) tmp = t * (y / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e-17], t$95$1, If[LessEqual[z, 3.5e+27], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+27}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.00000000000000007e-17 or 3.5000000000000002e27 < z Initial program 68.1%
Taylor expanded in z around inf
lower--.f6433.1
Applied rewrites33.1%
if -1.00000000000000007e-17 < z < 3.5000000000000002e27Initial program 91.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6493.1
Applied rewrites93.1%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6436.7
Applied rewrites36.7%
Taylor expanded in z around 0
Applied rewrites25.7%
Applied rewrites30.2%
Final simplification31.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (- t x)))) (if (<= z -1e-39) t_1 (if (<= z 2.8e+27) (* y (/ t a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -1e-39) {
tmp = t_1;
} else if (z <= 2.8e+27) {
tmp = y * (t / a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (t - x)
if (z <= (-1d-39)) then
tmp = t_1
else if (z <= 2.8d+27) then
tmp = y * (t / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -1e-39) {
tmp = t_1;
} else if (z <= 2.8e+27) {
tmp = y * (t / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t - x) tmp = 0 if z <= -1e-39: tmp = t_1 elif z <= 2.8e+27: tmp = y * (t / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t - x)) tmp = 0.0 if (z <= -1e-39) tmp = t_1; elseif (z <= 2.8e+27) tmp = Float64(y * Float64(t / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t - x); tmp = 0.0; if (z <= -1e-39) tmp = t_1; elseif (z <= 2.8e+27) tmp = y * (t / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e-39], t$95$1, If[LessEqual[z, 2.8e+27], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+27}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.99999999999999929e-40 or 2.7999999999999999e27 < z Initial program 70.1%
Taylor expanded in z around inf
lower--.f6432.0
Applied rewrites32.0%
if -9.99999999999999929e-40 < z < 2.7999999999999999e27Initial program 91.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6493.2
Applied rewrites93.2%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6436.6
Applied rewrites36.6%
Taylor expanded in z around 0
Applied rewrites26.8%
Applied rewrites30.4%
(FPCore (x y z t a) :precision binary64 (+ x (- t x)))
double code(double x, double y, double z, double t, double a) {
return x + (t - x);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (t - x)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (t - x);
}
def code(x, y, z, t, a): return x + (t - x)
function code(x, y, z, t, a) return Float64(x + Float64(t - x)) end
function tmp = code(x, y, z, t, a) tmp = x + (t - x); end
code[x_, y_, z_, t_, a_] := N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t - x\right)
\end{array}
Initial program 81.0%
Taylor expanded in z around inf
lower--.f6417.7
Applied rewrites17.7%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 81.0%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f6443.2
Applied rewrites43.2%
Taylor expanded in z around inf
Applied rewrites2.8%
herbie shell --seed 2024238
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))