
(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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* (- z y) (- x t)) (- z a)))))
(if (<= t_1 (- INFINITY))
(fma (* (/ (- x t) (+ a z)) (/ (- z y) (- a z))) (+ a z) x)
(if (<= t_1 -1e-304)
t_1
(if (<= t_1 1e-263)
(fma (- x) (* (- y a) (/ (- (/ t x) 1.0) z)) t)
(- x (/ (- z y) (/ (- z a) (- x t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((z - y) * (x - t)) / (z - a));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = fma((((x - t) / (a + z)) * ((z - y) / (a - z))), (a + z), x);
} else if (t_1 <= -1e-304) {
tmp = t_1;
} else if (t_1 <= 1e-263) {
tmp = fma(-x, ((y - a) * (((t / x) - 1.0) / z)), t);
} else {
tmp = x - ((z - y) / ((z - a) / (x - t)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(z - y) * Float64(x - t)) / Float64(z - a))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = fma(Float64(Float64(Float64(x - t) / Float64(a + z)) * Float64(Float64(z - y) / Float64(a - z))), Float64(a + z), x); elseif (t_1 <= -1e-304) tmp = t_1; elseif (t_1 <= 1e-263) tmp = fma(Float64(-x), Float64(Float64(y - a) * Float64(Float64(Float64(t / x) - 1.0) / z)), t); else tmp = Float64(x - Float64(Float64(z - y) / Float64(Float64(z - a) / Float64(x - t)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(z - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(N[(x - t), $MachinePrecision] / N[(a + z), $MachinePrecision]), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a + z), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, -1e-304], t$95$1, If[LessEqual[t$95$1, 1e-263], N[((-x) * N[(N[(y - a), $MachinePrecision] * N[(N[(N[(t / x), $MachinePrecision] - 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], N[(x - N[(N[(z - y), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\left(z - y\right) \cdot \left(x - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{a + z} \cdot \frac{z - y}{a - z}, a + z, x\right)\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{-263}:\\
\;\;\;\;\mathsf{fma}\left(-x, \left(y - a\right) \cdot \frac{\frac{t}{x} - 1}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z - y}{\frac{z - a}{x - t}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0Initial program 46.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6483.7
Applied rewrites83.7%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999971e-305Initial program 95.3%
if -9.99999999999999971e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1e-263Initial program 7.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f647.7
Applied rewrites7.7%
Taylor expanded in z around inf
Applied rewrites99.8%
if 1e-263 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 66.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6488.4
Applied rewrites88.4%
Final simplification90.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ (- t x) z) (- y a))))
(t_2 (- x (/ (* (- z y) (- x t)) (- z a)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -1e-304)
t_2
(if (<= t_2 0.0)
(- t (* (/ (- a y) z) x))
(if (<= t_2 2e+306) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (((t - x) / z) * (y - a));
double t_2 = x - (((z - y) * (x - t)) / (z - a));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -1e-304) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t - (((a - y) / z) * x);
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - (((t - x) / z) * (y - a));
double t_2 = x - (((z - y) * (x - t)) / (z - a));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -1e-304) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t - (((a - y) / z) * x);
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (((t - x) / z) * (y - a)) t_2 = x - (((z - y) * (x - t)) / (z - a)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -1e-304: tmp = t_2 elif t_2 <= 0.0: tmp = t - (((a - y) / z) * x) elif t_2 <= 2e+306: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))) t_2 = Float64(x - Float64(Float64(Float64(z - y) * Float64(x - t)) / Float64(z - a))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -1e-304) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t - Float64(Float64(Float64(a - y) / z) * x)); elseif (t_2 <= 2e+306) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (((t - x) / z) * (y - a)); t_2 = x - (((z - y) * (x - t)) / (z - a)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -1e-304) tmp = t_2; elseif (t_2 <= 0.0) tmp = t - (((a - y) / z) * x); elseif (t_2 <= 2e+306) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(z - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-304], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+306], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{t - x}{z} \cdot \left(y - a\right)\\
t_2 := x - \frac{\left(z - y\right) \cdot \left(x - t\right)}{z - a}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-304}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - \frac{a - y}{z} \cdot x\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 2.00000000000000003e306 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 37.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6483.8
Applied rewrites83.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6470.3
Applied rewrites70.3%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999971e-305 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000003e306Initial program 96.6%
if -9.99999999999999971e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f645.0
Applied rewrites5.0%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites95.8%
Taylor expanded in t around 0
Applied rewrites99.7%
Final simplification87.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ (- t x) z) (- y a))))
(t_2 (- x (/ (* (- z y) (- x t)) (- z a))))
(t_3 (- x (/ (* t (- y z)) (- z a)))))
(if (<= t_2 -2e+306)
t_1
(if (<= t_2 -1e-304)
t_3
(if (<= t_2 0.0)
(- t (* (/ (- a y) z) x))
(if (<= t_2 2e+306) t_3 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (((t - x) / z) * (y - a));
double t_2 = x - (((z - y) * (x - t)) / (z - a));
double t_3 = x - ((t * (y - z)) / (z - a));
double tmp;
if (t_2 <= -2e+306) {
tmp = t_1;
} else if (t_2 <= -1e-304) {
tmp = t_3;
} else if (t_2 <= 0.0) {
tmp = t - (((a - y) / z) * x);
} else if (t_2 <= 2e+306) {
tmp = t_3;
} 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t - (((t - x) / z) * (y - a))
t_2 = x - (((z - y) * (x - t)) / (z - a))
t_3 = x - ((t * (y - z)) / (z - a))
if (t_2 <= (-2d+306)) then
tmp = t_1
else if (t_2 <= (-1d-304)) then
tmp = t_3
else if (t_2 <= 0.0d0) then
tmp = t - (((a - y) / z) * x)
else if (t_2 <= 2d+306) then
tmp = t_3
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 = t - (((t - x) / z) * (y - a));
double t_2 = x - (((z - y) * (x - t)) / (z - a));
double t_3 = x - ((t * (y - z)) / (z - a));
double tmp;
if (t_2 <= -2e+306) {
tmp = t_1;
} else if (t_2 <= -1e-304) {
tmp = t_3;
} else if (t_2 <= 0.0) {
tmp = t - (((a - y) / z) * x);
} else if (t_2 <= 2e+306) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (((t - x) / z) * (y - a)) t_2 = x - (((z - y) * (x - t)) / (z - a)) t_3 = x - ((t * (y - z)) / (z - a)) tmp = 0 if t_2 <= -2e+306: tmp = t_1 elif t_2 <= -1e-304: tmp = t_3 elif t_2 <= 0.0: tmp = t - (((a - y) / z) * x) elif t_2 <= 2e+306: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))) t_2 = Float64(x - Float64(Float64(Float64(z - y) * Float64(x - t)) / Float64(z - a))) t_3 = Float64(x - Float64(Float64(t * Float64(y - z)) / Float64(z - a))) tmp = 0.0 if (t_2 <= -2e+306) tmp = t_1; elseif (t_2 <= -1e-304) tmp = t_3; elseif (t_2 <= 0.0) tmp = Float64(t - Float64(Float64(Float64(a - y) / z) * x)); elseif (t_2 <= 2e+306) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (((t - x) / z) * (y - a)); t_2 = x - (((z - y) * (x - t)) / (z - a)); t_3 = x - ((t * (y - z)) / (z - a)); tmp = 0.0; if (t_2 <= -2e+306) tmp = t_1; elseif (t_2 <= -1e-304) tmp = t_3; elseif (t_2 <= 0.0) tmp = t - (((a - y) / z) * x); elseif (t_2 <= 2e+306) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(z - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+306], t$95$1, If[LessEqual[t$95$2, -1e-304], t$95$3, If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+306], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{t - x}{z} \cdot \left(y - a\right)\\
t_2 := x - \frac{\left(z - y\right) \cdot \left(x - t\right)}{z - a}\\
t_3 := x - \frac{t \cdot \left(y - z\right)}{z - a}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-304}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - \frac{a - y}{z} \cdot x\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2.00000000000000003e306 or 2.00000000000000003e306 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 38.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6484.0
Applied rewrites84.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6469.7
Applied rewrites69.7%
if -2.00000000000000003e306 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999971e-305 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.00000000000000003e306Initial program 96.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6487.3
Applied rewrites87.3%
if -9.99999999999999971e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f645.0
Applied rewrites5.0%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites95.8%
Taylor expanded in t around 0
Applied rewrites99.7%
Final simplification81.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (- z y) (/ (- z a) (- x t)))))
(t_2 (- x (/ (* (- z y) (- x t)) (- z a)))))
(if (<= t_2 -2e+306)
t_1
(if (<= t_2 -1e-304)
t_2
(if (<= t_2 1e-263)
(fma (- x) (* (- y a) (/ (- (/ t x) 1.0) z)) t)
t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((z - y) / ((z - a) / (x - t)));
double t_2 = x - (((z - y) * (x - t)) / (z - a));
double tmp;
if (t_2 <= -2e+306) {
tmp = t_1;
} else if (t_2 <= -1e-304) {
tmp = t_2;
} else if (t_2 <= 1e-263) {
tmp = fma(-x, ((y - a) * (((t / x) - 1.0) / z)), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(z - y) / Float64(Float64(z - a) / Float64(x - t)))) t_2 = Float64(x - Float64(Float64(Float64(z - y) * Float64(x - t)) / Float64(z - a))) tmp = 0.0 if (t_2 <= -2e+306) tmp = t_1; elseif (t_2 <= -1e-304) tmp = t_2; elseif (t_2 <= 1e-263) tmp = fma(Float64(-x), Float64(Float64(y - a) * Float64(Float64(Float64(t / x) - 1.0) / z)), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(z - y), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(z - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+306], t$95$1, If[LessEqual[t$95$2, -1e-304], t$95$2, If[LessEqual[t$95$2, 1e-263], N[((-x) * N[(N[(y - a), $MachinePrecision] * N[(N[(N[(t / x), $MachinePrecision] - 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{z - y}{\frac{z - a}{x - t}}\\
t_2 := x - \frac{\left(z - y\right) \cdot \left(x - t\right)}{z - a}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-304}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 10^{-263}:\\
\;\;\;\;\mathsf{fma}\left(-x, \left(y - a\right) \cdot \frac{\frac{t}{x} - 1}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2.00000000000000003e306 or 1e-263 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 61.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6487.1
Applied rewrites87.1%
if -2.00000000000000003e306 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999971e-305Initial program 95.3%
if -9.99999999999999971e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1e-263Initial program 7.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f647.7
Applied rewrites7.7%
Taylor expanded in z around inf
Applied rewrites99.8%
Final simplification90.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (- z y) (/ (- z a) (- x t)))))
(t_2 (- x (/ (* (- z y) (- x t)) (- z a)))))
(if (<= t_2 -2e+306)
t_1
(if (<= t_2 -1e-304)
t_2
(if (<= t_2 1e-263) (- t (* (/ (- a y) z) x)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((z - y) / ((z - a) / (x - t)));
double t_2 = x - (((z - y) * (x - t)) / (z - a));
double tmp;
if (t_2 <= -2e+306) {
tmp = t_1;
} else if (t_2 <= -1e-304) {
tmp = t_2;
} else if (t_2 <= 1e-263) {
tmp = t - (((a - y) / z) * x);
} 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) :: t_2
real(8) :: tmp
t_1 = x - ((z - y) / ((z - a) / (x - t)))
t_2 = x - (((z - y) * (x - t)) / (z - a))
if (t_2 <= (-2d+306)) then
tmp = t_1
else if (t_2 <= (-1d-304)) then
tmp = t_2
else if (t_2 <= 1d-263) then
tmp = t - (((a - y) / z) * x)
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 - ((z - y) / ((z - a) / (x - t)));
double t_2 = x - (((z - y) * (x - t)) / (z - a));
double tmp;
if (t_2 <= -2e+306) {
tmp = t_1;
} else if (t_2 <= -1e-304) {
tmp = t_2;
} else if (t_2 <= 1e-263) {
tmp = t - (((a - y) / z) * x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((z - y) / ((z - a) / (x - t))) t_2 = x - (((z - y) * (x - t)) / (z - a)) tmp = 0 if t_2 <= -2e+306: tmp = t_1 elif t_2 <= -1e-304: tmp = t_2 elif t_2 <= 1e-263: tmp = t - (((a - y) / z) * x) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(z - y) / Float64(Float64(z - a) / Float64(x - t)))) t_2 = Float64(x - Float64(Float64(Float64(z - y) * Float64(x - t)) / Float64(z - a))) tmp = 0.0 if (t_2 <= -2e+306) tmp = t_1; elseif (t_2 <= -1e-304) tmp = t_2; elseif (t_2 <= 1e-263) tmp = Float64(t - Float64(Float64(Float64(a - y) / z) * x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((z - y) / ((z - a) / (x - t))); t_2 = x - (((z - y) * (x - t)) / (z - a)); tmp = 0.0; if (t_2 <= -2e+306) tmp = t_1; elseif (t_2 <= -1e-304) tmp = t_2; elseif (t_2 <= 1e-263) tmp = t - (((a - y) / z) * x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(z - y), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(z - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+306], t$95$1, If[LessEqual[t$95$2, -1e-304], t$95$2, If[LessEqual[t$95$2, 1e-263], N[(t - N[(N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{z - y}{\frac{z - a}{x - t}}\\
t_2 := x - \frac{\left(z - y\right) \cdot \left(x - t\right)}{z - a}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-304}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 10^{-263}:\\
\;\;\;\;t - \frac{a - y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2.00000000000000003e306 or 1e-263 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 61.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6487.1
Applied rewrites87.1%
if -2.00000000000000003e306 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999971e-305Initial program 95.3%
if -9.99999999999999971e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1e-263Initial program 7.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f645.1
Applied rewrites5.1%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites96.0%
Taylor expanded in t around 0
Applied rewrites99.7%
Final simplification90.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ (- a y) z) x))))
(if (<= z -1.3e+94)
t_1
(if (<= z -390000000000.0)
(* (/ t (- z a)) (- z y))
(if (<= z 240.0) (fma (/ (- y z) a) (- t x) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (((a - y) / z) * x);
double tmp;
if (z <= -1.3e+94) {
tmp = t_1;
} else if (z <= -390000000000.0) {
tmp = (t / (z - a)) * (z - y);
} else if (z <= 240.0) {
tmp = fma(((y - z) / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(Float64(a - y) / z) * x)) tmp = 0.0 if (z <= -1.3e+94) tmp = t_1; elseif (z <= -390000000000.0) tmp = Float64(Float64(t / Float64(z - a)) * Float64(z - y)); elseif (z <= 240.0) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+94], t$95$1, If[LessEqual[z, -390000000000.0], N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 240.0], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{a - y}{z} \cdot x\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -390000000000:\\
\;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{elif}\;z \leq 240:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.3e94 or 240 < z Initial program 40.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6463.6
Applied rewrites63.6%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites59.7%
Taylor expanded in t around 0
Applied rewrites76.1%
if -1.3e94 < z < -3.9e11Initial program 67.0%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6474.2
Applied rewrites74.2%
if -3.9e11 < z < 240Initial program 84.6%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6478.2
Applied rewrites78.2%
Final simplification77.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ t (- z a)) (- z y))))
(if (<= z -6.2e+95)
(fma a (/ (- t x) z) t)
(if (<= z -390000000000.0)
t_1
(if (<= z 2.8e-25) (fma (- t x) (/ y a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t / (z - a)) * (z - y);
double tmp;
if (z <= -6.2e+95) {
tmp = fma(a, ((t - x) / z), t);
} else if (z <= -390000000000.0) {
tmp = t_1;
} else if (z <= 2.8e-25) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t / Float64(z - a)) * Float64(z - y)) tmp = 0.0 if (z <= -6.2e+95) tmp = fma(a, Float64(Float64(t - x) / z), t); elseif (z <= -390000000000.0) tmp = t_1; elseif (z <= 2.8e-25) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e+95], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, -390000000000.0], t$95$1, If[LessEqual[z, 2.8e-25], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+95}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{elif}\;z \leq -390000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-25}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.2000000000000006e95Initial program 32.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6452.7
Applied rewrites52.7%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites49.1%
Taylor expanded in y around 0
Applied rewrites54.3%
if -6.2000000000000006e95 < z < -3.9e11 or 2.79999999999999988e-25 < z Initial program 56.2%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6467.7
Applied rewrites67.7%
if -3.9e11 < z < 2.79999999999999988e-25Initial program 84.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6486.7
Applied rewrites86.7%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites30.7%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6475.5
Applied rewrites75.5%
Final simplification69.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.9e+88)
(* 1.0 x)
(if (<= a 1.45e-270)
(* (/ t x) x)
(if (<= a 5.8e+128) (/ (* (- t x) y) a) (* 1.0 x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e+88) {
tmp = 1.0 * x;
} else if (a <= 1.45e-270) {
tmp = (t / x) * x;
} else if (a <= 5.8e+128) {
tmp = ((t - x) * y) / a;
} else {
tmp = 1.0 * x;
}
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) :: tmp
if (a <= (-2.9d+88)) then
tmp = 1.0d0 * x
else if (a <= 1.45d-270) then
tmp = (t / x) * x
else if (a <= 5.8d+128) then
tmp = ((t - x) * y) / a
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e+88) {
tmp = 1.0 * x;
} else if (a <= 1.45e-270) {
tmp = (t / x) * x;
} else if (a <= 5.8e+128) {
tmp = ((t - x) * y) / a;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.9e+88: tmp = 1.0 * x elif a <= 1.45e-270: tmp = (t / x) * x elif a <= 5.8e+128: tmp = ((t - x) * y) / a else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.9e+88) tmp = Float64(1.0 * x); elseif (a <= 1.45e-270) tmp = Float64(Float64(t / x) * x); elseif (a <= 5.8e+128) tmp = Float64(Float64(Float64(t - x) * y) / a); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.9e+88) tmp = 1.0 * x; elseif (a <= 1.45e-270) tmp = (t / x) * x; elseif (a <= 5.8e+128) tmp = ((t - x) * y) / a; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.9e+88], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, 1.45e-270], N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 5.8e+128], N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / a), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+88}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{-270}:\\
\;\;\;\;\frac{t}{x} \cdot x\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{+128}:\\
\;\;\;\;\frac{\left(t - x\right) \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -2.9e88 or 5.8000000000000001e128 < a Initial program 67.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6480.9
Applied rewrites80.9%
Taylor expanded in a around inf
Applied rewrites61.0%
if -2.9e88 < a < 1.44999999999999991e-270Initial program 60.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6464.2
Applied rewrites64.2%
Taylor expanded in z around inf
Applied rewrites42.3%
if 1.44999999999999991e-270 < a < 5.8000000000000001e128Initial program 71.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6481.7
Applied rewrites81.7%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6445.2
Applied rewrites45.2%
Taylor expanded in a around inf
Applied rewrites33.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.9e+88)
(* 1.0 x)
(if (<= a 2.95e-77)
(* (/ t x) x)
(if (<= a 1.65e+39) (* (/ y (- a z)) t) (* 1.0 x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e+88) {
tmp = 1.0 * x;
} else if (a <= 2.95e-77) {
tmp = (t / x) * x;
} else if (a <= 1.65e+39) {
tmp = (y / (a - z)) * t;
} else {
tmp = 1.0 * x;
}
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) :: tmp
if (a <= (-2.9d+88)) then
tmp = 1.0d0 * x
else if (a <= 2.95d-77) then
tmp = (t / x) * x
else if (a <= 1.65d+39) then
tmp = (y / (a - z)) * t
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e+88) {
tmp = 1.0 * x;
} else if (a <= 2.95e-77) {
tmp = (t / x) * x;
} else if (a <= 1.65e+39) {
tmp = (y / (a - z)) * t;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.9e+88: tmp = 1.0 * x elif a <= 2.95e-77: tmp = (t / x) * x elif a <= 1.65e+39: tmp = (y / (a - z)) * t else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.9e+88) tmp = Float64(1.0 * x); elseif (a <= 2.95e-77) tmp = Float64(Float64(t / x) * x); elseif (a <= 1.65e+39) tmp = Float64(Float64(y / Float64(a - z)) * t); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.9e+88) tmp = 1.0 * x; elseif (a <= 2.95e-77) tmp = (t / x) * x; elseif (a <= 1.65e+39) tmp = (y / (a - z)) * t; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.9e+88], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, 2.95e-77], N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 1.65e+39], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+88}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq 2.95 \cdot 10^{-77}:\\
\;\;\;\;\frac{t}{x} \cdot x\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{+39}:\\
\;\;\;\;\frac{y}{a - z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -2.9e88 or 1.6500000000000001e39 < a Initial program 65.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6479.2
Applied rewrites79.2%
Taylor expanded in a around inf
Applied rewrites56.8%
if -2.9e88 < a < 2.94999999999999982e-77Initial program 66.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6467.3
Applied rewrites67.3%
Taylor expanded in z around inf
Applied rewrites37.9%
if 2.94999999999999982e-77 < a < 1.6500000000000001e39Initial program 72.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6483.7
Applied rewrites83.7%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6448.2
Applied rewrites48.2%
Taylor expanded in t around inf
Applied rewrites43.2%
Final simplification45.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ (- t x) z) (- y a)))))
(if (<= z -1.1e+54)
t_1
(if (<= z 130.0) (fma (/ (- y z) a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (((t - x) / z) * (y - a));
double tmp;
if (z <= -1.1e+54) {
tmp = t_1;
} else if (z <= 130.0) {
tmp = fma(((y - z) / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))) tmp = 0.0 if (z <= -1.1e+54) tmp = t_1; elseif (z <= 130.0) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+54], t$95$1, If[LessEqual[z, 130.0], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 130:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.09999999999999995e54 or 130 < z Initial program 43.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6464.2
Applied rewrites64.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6481.1
Applied rewrites81.1%
if -1.09999999999999995e54 < z < 130Initial program 82.7%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6476.3
Applied rewrites76.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -390000000000.0) (* (/ (- z y) (- z a)) t) (if (<= z 190.0) (fma (/ (- y z) a) (- t x) x) (- t (/ (* (- t x) y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -390000000000.0) {
tmp = ((z - y) / (z - a)) * t;
} else if (z <= 190.0) {
tmp = fma(((y - z) / a), (t - x), x);
} else {
tmp = t - (((t - x) * y) / z);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -390000000000.0) tmp = Float64(Float64(Float64(z - y) / Float64(z - a)) * t); elseif (z <= 190.0) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); else tmp = Float64(t - Float64(Float64(Float64(t - x) * y) / z)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -390000000000.0], N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 190.0], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -390000000000:\\
\;\;\;\;\frac{z - y}{z - a} \cdot t\\
\mathbf{elif}\;z \leq 190:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot y}{z}\\
\end{array}
\end{array}
if z < -3.9e11Initial program 43.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6464.6
Applied rewrites64.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6464.4
Applied rewrites64.4%
if -3.9e11 < z < 190Initial program 84.6%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6478.2
Applied rewrites78.2%
if 190 < z Initial program 47.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6473.3
Applied rewrites73.3%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites69.3%
Taylor expanded in a around 0
Applied rewrites69.6%
Final simplification72.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ (- z y) (- z a)) t)))
(if (<= z -390000000000.0)
t_1
(if (<= z 2.8e-25) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - y) / (z - a)) * t;
double tmp;
if (z <= -390000000000.0) {
tmp = t_1;
} else if (z <= 2.8e-25) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - y) / Float64(z - a)) * t) tmp = 0.0 if (z <= -390000000000.0) tmp = t_1; elseif (z <= 2.8e-25) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[z, -390000000000.0], t$95$1, If[LessEqual[z, 2.8e-25], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - y}{z - a} \cdot t\\
\mathbf{if}\;z \leq -390000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-25}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.9e11 or 2.79999999999999988e-25 < z Initial program 47.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6468.1
Applied rewrites68.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6465.8
Applied rewrites65.8%
if -3.9e11 < z < 2.79999999999999988e-25Initial program 84.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6486.7
Applied rewrites86.7%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites30.7%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6475.5
Applied rewrites75.5%
Final simplification70.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.6e+54) (* (/ (- z y) z) t) (if (<= z 44000000.0) (fma (- t x) (/ y a) x) (fma a (/ (- t x) z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.6e+54) {
tmp = ((z - y) / z) * t;
} else if (z <= 44000000.0) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = fma(a, ((t - x) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.6e+54) tmp = Float64(Float64(Float64(z - y) / z) * t); elseif (z <= 44000000.0) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = fma(a, Float64(Float64(t - x) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.6e+54], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 44000000.0], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+54}:\\
\;\;\;\;\frac{z - y}{z} \cdot t\\
\mathbf{elif}\;z \leq 44000000:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.6e54Initial program 40.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6450.0
Applied rewrites50.0%
Taylor expanded in a around 0
Applied rewrites58.5%
if -1.6e54 < z < 4.4e7Initial program 82.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6486.4
Applied rewrites86.4%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites32.3%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6471.2
Applied rewrites71.2%
if 4.4e7 < z Initial program 47.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6473.3
Applied rewrites73.3%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites69.3%
Taylor expanded in y around 0
Applied rewrites67.3%
Final simplification67.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma a (/ (- t x) z) t)))
(if (<= z -6.2e+57)
t_1
(if (<= z 44000000.0) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, ((t - x) / z), t);
double tmp;
if (z <= -6.2e+57) {
tmp = t_1;
} else if (z <= 44000000.0) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(Float64(t - x) / z), t) tmp = 0.0 if (z <= -6.2e+57) tmp = t_1; elseif (z <= 44000000.0) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -6.2e+57], t$95$1, If[LessEqual[z, 44000000.0], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 44000000:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.20000000000000026e57 or 4.4e7 < z Initial program 43.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6465.6
Applied rewrites65.6%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites63.9%
Taylor expanded in y around 0
Applied rewrites59.5%
if -6.20000000000000026e57 < z < 4.4e7Initial program 82.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6486.4
Applied rewrites86.4%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites32.3%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6471.2
Applied rewrites71.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma a (/ (- t x) z) t)))
(if (<= z -6.2e+57)
t_1
(if (<= z 44000000.0) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, ((t - x) / z), t);
double tmp;
if (z <= -6.2e+57) {
tmp = t_1;
} else if (z <= 44000000.0) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(Float64(t - x) / z), t) tmp = 0.0 if (z <= -6.2e+57) tmp = t_1; elseif (z <= 44000000.0) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -6.2e+57], t$95$1, If[LessEqual[z, 44000000.0], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 44000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.20000000000000026e57 or 4.4e7 < z Initial program 43.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6465.6
Applied rewrites65.6%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites63.9%
Taylor expanded in y around 0
Applied rewrites59.5%
if -6.20000000000000026e57 < z < 4.4e7Initial program 82.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6469.7
Applied rewrites69.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ t x) x))) (if (<= z -6.8e+57) t_1 (if (<= z 1.6e+107) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t / x) * x;
double tmp;
if (z <= -6.8e+57) {
tmp = t_1;
} else if (z <= 1.6e+107) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t / x) * x) tmp = 0.0 if (z <= -6.8e+57) tmp = t_1; elseif (z <= 1.6e+107) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -6.8e+57], t$95$1, If[LessEqual[z, 1.6e+107], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{x} \cdot x\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+107}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.79999999999999984e57 or 1.60000000000000015e107 < z Initial program 38.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6457.1
Applied rewrites57.1%
Taylor expanded in z around inf
Applied rewrites49.7%
if -6.79999999999999984e57 < z < 1.60000000000000015e107Initial program 81.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6466.5
Applied rewrites66.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ t x) x))) (if (<= z -3.8e-9) t_1 (if (<= z 1.7e+95) (+ (/ (* t y) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t / x) * x;
double tmp;
if (z <= -3.8e-9) {
tmp = t_1;
} else if (z <= 1.7e+95) {
tmp = ((t * y) / a) + x;
} 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 = (t / x) * x
if (z <= (-3.8d-9)) then
tmp = t_1
else if (z <= 1.7d+95) then
tmp = ((t * y) / a) + x
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 = (t / x) * x;
double tmp;
if (z <= -3.8e-9) {
tmp = t_1;
} else if (z <= 1.7e+95) {
tmp = ((t * y) / a) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t / x) * x tmp = 0 if z <= -3.8e-9: tmp = t_1 elif z <= 1.7e+95: tmp = ((t * y) / a) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t / x) * x) tmp = 0.0 if (z <= -3.8e-9) tmp = t_1; elseif (z <= 1.7e+95) tmp = Float64(Float64(Float64(t * y) / a) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t / x) * x; tmp = 0.0; if (z <= -3.8e-9) tmp = t_1; elseif (z <= 1.7e+95) tmp = ((t * y) / a) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -3.8e-9], t$95$1, If[LessEqual[z, 1.7e+95], N[(N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{x} \cdot x\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+95}:\\
\;\;\;\;\frac{t \cdot y}{a} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.80000000000000011e-9 or 1.70000000000000011e95 < z Initial program 41.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6461.8
Applied rewrites61.8%
Taylor expanded in z around inf
Applied rewrites45.4%
if -3.80000000000000011e-9 < z < 1.70000000000000011e95Initial program 83.6%
Taylor expanded in z around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6464.0
Applied rewrites64.0%
Taylor expanded in t around inf
Applied rewrites55.1%
Final simplification51.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.9e+88) (* 1.0 x) (if (<= a 95000000000.0) (* (/ t x) x) (* 1.0 x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e+88) {
tmp = 1.0 * x;
} else if (a <= 95000000000.0) {
tmp = (t / x) * x;
} else {
tmp = 1.0 * x;
}
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) :: tmp
if (a <= (-2.9d+88)) then
tmp = 1.0d0 * x
else if (a <= 95000000000.0d0) then
tmp = (t / x) * x
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e+88) {
tmp = 1.0 * x;
} else if (a <= 95000000000.0) {
tmp = (t / x) * x;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.9e+88: tmp = 1.0 * x elif a <= 95000000000.0: tmp = (t / x) * x else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.9e+88) tmp = Float64(1.0 * x); elseif (a <= 95000000000.0) tmp = Float64(Float64(t / x) * x); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.9e+88) tmp = 1.0 * x; elseif (a <= 95000000000.0) tmp = (t / x) * x; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.9e+88], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, 95000000000.0], N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+88}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq 95000000000:\\
\;\;\;\;\frac{t}{x} \cdot x\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -2.9e88 or 9.5e10 < a Initial program 67.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6479.0
Applied rewrites79.0%
Taylor expanded in a around inf
Applied rewrites54.6%
if -2.9e88 < a < 9.5e10Initial program 66.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6467.6
Applied rewrites67.6%
Taylor expanded in z around inf
Applied rewrites36.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -1e+82) (* 1.0 x) (if (<= a 2.7e+154) (+ (- t x) x) (* 1.0 x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1e+82) {
tmp = 1.0 * x;
} else if (a <= 2.7e+154) {
tmp = (t - x) + x;
} else {
tmp = 1.0 * x;
}
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) :: tmp
if (a <= (-1d+82)) then
tmp = 1.0d0 * x
else if (a <= 2.7d+154) then
tmp = (t - x) + x
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1e+82) {
tmp = 1.0 * x;
} else if (a <= 2.7e+154) {
tmp = (t - x) + x;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1e+82: tmp = 1.0 * x elif a <= 2.7e+154: tmp = (t - x) + x else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1e+82) tmp = Float64(1.0 * x); elseif (a <= 2.7e+154) tmp = Float64(Float64(t - x) + x); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1e+82) tmp = 1.0 * x; elseif (a <= 2.7e+154) tmp = (t - x) + x; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1e+82], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, 2.7e+154], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+82}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{+154}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -9.9999999999999996e81 or 2.70000000000000006e154 < a Initial program 66.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6479.1
Applied rewrites79.1%
Taylor expanded in a around inf
Applied rewrites61.1%
if -9.9999999999999996e81 < a < 2.70000000000000006e154Initial program 66.6%
Taylor expanded in z around inf
lower--.f6428.3
Applied rewrites28.3%
Final simplification39.6%
(FPCore (x y z t a) :precision binary64 (* 1.0 x))
double code(double x, double y, double z, double t, double a) {
return 1.0 * 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 = 1.0d0 * x
end function
public static double code(double x, double y, double z, double t, double a) {
return 1.0 * x;
}
def code(x, y, z, t, a): return 1.0 * x
function code(x, y, z, t, a) return Float64(1.0 * x) end
function tmp = code(x, y, z, t, a) tmp = 1.0 * x; end
code[x_, y_, z_, t_, a_] := N[(1.0 * x), $MachinePrecision]
\begin{array}{l}
\\
1 \cdot x
\end{array}
Initial program 66.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6472.5
Applied rewrites72.5%
Taylor expanded in a around inf
Applied rewrites27.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} 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 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
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 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024276
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))