
(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 16 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 -4e-279)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= t_1 0.0)
(+ t (/ (* (- t x) (- a y)) z))
(+ x (/ (- t x) (/ (- a z) (- y z))))))))
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 <= -4e-279) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
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 <= -4e-279) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); 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, -4e-279], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -4 \cdot 10^{-279}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.00000000000000022e-279Initial program 90.4%
+-commutative90.4%
associate-*r/71.6%
*-commutative71.6%
associate-*r/94.3%
fma-def94.4%
Simplified94.4%
if -4.00000000000000022e-279 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.8%
Taylor expanded in z around inf 96.7%
+-commutative96.7%
associate--l+96.7%
associate-*r/96.7%
associate-*r/96.7%
div-sub96.7%
distribute-lft-out--96.7%
mul-1-neg96.7%
distribute-neg-frac96.7%
unsub-neg96.7%
distribute-rgt-out--96.7%
Simplified96.7%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.7%
*-commutative91.7%
associate-*l/82.0%
associate-*r/95.2%
clear-num95.1%
un-div-inv95.2%
Applied egg-rr95.2%
Final simplification95.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -1e-209) (not (<= t_1 0.0)))
t_1
(+ t (/ (* (- t x) (- a y)) z)))))
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 <= -1e-209) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
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 + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-1d-209)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static 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 <= -1e-209) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -1e-209) or not (t_1 <= 0.0): tmp = t_1 else: tmp = t + (((t - x) * (a - y)) / z) 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 <= -1e-209) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -1e-209) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = 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[Or[LessEqual[t$95$1, -1e-209], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $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 -1 \cdot 10^{-209} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1e-209 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.2%
if -1e-209 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 9.2%
Taylor expanded in z around inf 91.7%
+-commutative91.7%
associate--l+91.7%
associate-*r/91.7%
associate-*r/91.7%
div-sub91.7%
distribute-lft-out--91.7%
mul-1-neg91.7%
distribute-neg-frac91.7%
unsub-neg91.7%
distribute-rgt-out--91.7%
Simplified91.7%
Final simplification92.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -4e-279) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (/ (* (- t x) (- a y)) z)))))
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 <= -4e-279) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
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 + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-4d-279)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static 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 <= -4e-279) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -4e-279) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + (((t - x) * (a - y)) / z) 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 <= -4e-279) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -4e-279) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = 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[Or[LessEqual[t$95$1, -4e-279], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $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 -4 \cdot 10^{-279} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.00000000000000022e-279 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.1%
*-commutative91.1%
associate-*l/77.0%
associate-*r/94.8%
clear-num94.6%
un-div-inv94.7%
Applied egg-rr94.7%
if -4.00000000000000022e-279 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.8%
Taylor expanded in z around inf 96.7%
+-commutative96.7%
associate--l+96.7%
associate-*r/96.7%
associate-*r/96.7%
div-sub96.7%
distribute-lft-out--96.7%
mul-1-neg96.7%
distribute-neg-frac96.7%
unsub-neg96.7%
distribute-rgt-out--96.7%
Simplified96.7%
Final simplification94.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t x) a))))
(if (<= z -2.05e+37)
t
(if (<= z -1.85e-25)
t_1
(if (<= z -1.3e-87)
x
(if (<= z -1.1e-283)
t_1
(if (<= z 1.7e-214)
x
(if (<= z 1.8e-172) t_1 (if (<= z 1.4e+18) x t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / a);
double tmp;
if (z <= -2.05e+37) {
tmp = t;
} else if (z <= -1.85e-25) {
tmp = t_1;
} else if (z <= -1.3e-87) {
tmp = x;
} else if (z <= -1.1e-283) {
tmp = t_1;
} else if (z <= 1.7e-214) {
tmp = x;
} else if (z <= 1.8e-172) {
tmp = t_1;
} else if (z <= 1.4e+18) {
tmp = x;
} else {
tmp = t;
}
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 = y * ((t - x) / a)
if (z <= (-2.05d+37)) then
tmp = t
else if (z <= (-1.85d-25)) then
tmp = t_1
else if (z <= (-1.3d-87)) then
tmp = x
else if (z <= (-1.1d-283)) then
tmp = t_1
else if (z <= 1.7d-214) then
tmp = x
else if (z <= 1.8d-172) then
tmp = t_1
else if (z <= 1.4d+18) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / a);
double tmp;
if (z <= -2.05e+37) {
tmp = t;
} else if (z <= -1.85e-25) {
tmp = t_1;
} else if (z <= -1.3e-87) {
tmp = x;
} else if (z <= -1.1e-283) {
tmp = t_1;
} else if (z <= 1.7e-214) {
tmp = x;
} else if (z <= 1.8e-172) {
tmp = t_1;
} else if (z <= 1.4e+18) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / a) tmp = 0 if z <= -2.05e+37: tmp = t elif z <= -1.85e-25: tmp = t_1 elif z <= -1.3e-87: tmp = x elif z <= -1.1e-283: tmp = t_1 elif z <= 1.7e-214: tmp = x elif z <= 1.8e-172: tmp = t_1 elif z <= 1.4e+18: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / a)) tmp = 0.0 if (z <= -2.05e+37) tmp = t; elseif (z <= -1.85e-25) tmp = t_1; elseif (z <= -1.3e-87) tmp = x; elseif (z <= -1.1e-283) tmp = t_1; elseif (z <= 1.7e-214) tmp = x; elseif (z <= 1.8e-172) tmp = t_1; elseif (z <= 1.4e+18) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / a); tmp = 0.0; if (z <= -2.05e+37) tmp = t; elseif (z <= -1.85e-25) tmp = t_1; elseif (z <= -1.3e-87) tmp = x; elseif (z <= -1.1e-283) tmp = t_1; elseif (z <= 1.7e-214) tmp = x; elseif (z <= 1.8e-172) tmp = t_1; elseif (z <= 1.4e+18) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e+37], t, If[LessEqual[z, -1.85e-25], t$95$1, If[LessEqual[z, -1.3e-87], x, If[LessEqual[z, -1.1e-283], t$95$1, If[LessEqual[z, 1.7e-214], x, If[LessEqual[z, 1.8e-172], t$95$1, If[LessEqual[z, 1.4e+18], x, t]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a}\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{+37}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-87}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-283}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-214}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-172}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+18}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.0499999999999999e37 or 1.4e18 < z Initial program 69.4%
Taylor expanded in z around inf 51.9%
if -2.0499999999999999e37 < z < -1.85000000000000004e-25 or -1.30000000000000001e-87 < z < -1.0999999999999999e-283 or 1.7e-214 < z < 1.80000000000000007e-172Initial program 87.1%
+-commutative87.1%
fma-def87.2%
Simplified87.2%
Taylor expanded in a around inf 76.6%
Taylor expanded in y around inf 52.0%
*-commutative52.0%
div-sub55.4%
Simplified55.4%
if -1.85000000000000004e-25 < z < -1.30000000000000001e-87 or -1.0999999999999999e-283 < z < 1.7e-214 or 1.80000000000000007e-172 < z < 1.4e18Initial program 92.8%
Taylor expanded in a around inf 48.5%
Final simplification51.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7.8e+43) (not (<= z 1.95e+61))) (/ t (/ (- a z) (- y z))) (+ x (/ (- t x) (/ (- a z) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.8e+43) || !(z <= 1.95e+61)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x + ((t - x) / ((a - z) / y));
}
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 ((z <= (-7.8d+43)) .or. (.not. (z <= 1.95d+61))) then
tmp = t / ((a - z) / (y - z))
else
tmp = x + ((t - x) / ((a - z) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.8e+43) || !(z <= 1.95e+61)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x + ((t - x) / ((a - z) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7.8e+43) or not (z <= 1.95e+61): tmp = t / ((a - z) / (y - z)) else: tmp = x + ((t - x) / ((a - z) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7.8e+43) || !(z <= 1.95e+61)) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7.8e+43) || ~((z <= 1.95e+61))) tmp = t / ((a - z) / (y - z)); else tmp = x + ((t - x) / ((a - z) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.8e+43], N[Not[LessEqual[z, 1.95e+61]], $MachinePrecision]], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+43} \lor \neg \left(z \leq 1.95 \cdot 10^{+61}\right):\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\
\end{array}
\end{array}
if z < -7.8000000000000001e43 or 1.94999999999999994e61 < z Initial program 66.2%
Taylor expanded in x around 0 47.8%
associate-/l*67.3%
Simplified67.3%
if -7.8000000000000001e43 < z < 1.94999999999999994e61Initial program 90.6%
*-commutative90.6%
associate-*l/87.0%
associate-*r/93.3%
clear-num93.1%
un-div-inv93.2%
Applied egg-rr93.2%
Taylor expanded in y around inf 82.7%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.6e+42) (not (<= z 1.85e+32))) (+ t (/ (* (- t x) (- a y)) z)) (+ x (/ (- t x) (/ (- a z) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.6e+42) || !(z <= 1.85e+32)) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = x + ((t - x) / ((a - z) / y));
}
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 ((z <= (-3.6d+42)) .or. (.not. (z <= 1.85d+32))) then
tmp = t + (((t - x) * (a - y)) / z)
else
tmp = x + ((t - x) / ((a - z) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.6e+42) || !(z <= 1.85e+32)) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = x + ((t - x) / ((a - z) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.6e+42) or not (z <= 1.85e+32): tmp = t + (((t - x) * (a - y)) / z) else: tmp = x + ((t - x) / ((a - z) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.6e+42) || !(z <= 1.85e+32)) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.6e+42) || ~((z <= 1.85e+32))) tmp = t + (((t - x) * (a - y)) / z); else tmp = x + ((t - x) / ((a - z) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.6e+42], N[Not[LessEqual[z, 1.85e+32]], $MachinePrecision]], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+42} \lor \neg \left(z \leq 1.85 \cdot 10^{+32}\right):\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\
\end{array}
\end{array}
if z < -3.6000000000000001e42 or 1.85e32 < z Initial program 68.6%
Taylor expanded in z around inf 71.8%
+-commutative71.8%
associate--l+71.8%
associate-*r/71.8%
associate-*r/71.8%
div-sub71.8%
distribute-lft-out--71.8%
mul-1-neg71.8%
distribute-neg-frac71.8%
unsub-neg71.8%
distribute-rgt-out--72.0%
Simplified72.0%
if -3.6000000000000001e42 < z < 1.85e32Initial program 90.1%
*-commutative90.1%
associate-*l/87.5%
associate-*r/93.0%
clear-num92.7%
un-div-inv92.8%
Applied egg-rr92.8%
Taylor expanded in y around inf 83.2%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- t) (+ -1.0 (/ a z)))))
(if (<= z -4.4e+38)
t_1
(if (<= z -6.4e-186)
(* y (/ (- t x) (- a z)))
(if (<= z 1.55e+18) (- x (/ y (/ a x))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -t / (-1.0 + (a / z));
double tmp;
if (z <= -4.4e+38) {
tmp = t_1;
} else if (z <= -6.4e-186) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 1.55e+18) {
tmp = x - (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 / ((-1.0d0) + (a / z))
if (z <= (-4.4d+38)) then
tmp = t_1
else if (z <= (-6.4d-186)) then
tmp = y * ((t - x) / (a - z))
else if (z <= 1.55d+18) then
tmp = x - (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 / (-1.0 + (a / z));
double tmp;
if (z <= -4.4e+38) {
tmp = t_1;
} else if (z <= -6.4e-186) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 1.55e+18) {
tmp = x - (y / (a / x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -t / (-1.0 + (a / z)) tmp = 0 if z <= -4.4e+38: tmp = t_1 elif z <= -6.4e-186: tmp = y * ((t - x) / (a - z)) elif z <= 1.55e+18: tmp = x - (y / (a / x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-t) / Float64(-1.0 + Float64(a / z))) tmp = 0.0 if (z <= -4.4e+38) tmp = t_1; elseif (z <= -6.4e-186) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (z <= 1.55e+18) tmp = Float64(x - Float64(y / Float64(a / x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -t / (-1.0 + (a / z)); tmp = 0.0; if (z <= -4.4e+38) tmp = t_1; elseif (z <= -6.4e-186) tmp = y * ((t - x) / (a - z)); elseif (z <= 1.55e+18) tmp = x - (y / (a / x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) / N[(-1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e+38], t$95$1, If[LessEqual[z, -6.4e-186], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+18], N[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-t}{-1 + \frac{a}{z}}\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{+38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-186}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+18}:\\
\;\;\;\;x - \frac{y}{\frac{a}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.40000000000000013e38 or 1.55e18 < z Initial program 69.4%
Taylor expanded in y around 0 37.6%
mul-1-neg37.6%
unsub-neg37.6%
*-commutative37.6%
associate-/l*58.5%
div-sub58.5%
*-inverses58.5%
Simplified58.5%
Taylor expanded in x around 0 59.0%
sub-neg59.0%
metadata-eval59.0%
associate-*r/59.0%
mul-1-neg59.0%
+-commutative59.0%
Simplified59.0%
if -4.40000000000000013e38 < z < -6.4000000000000001e-186Initial program 89.2%
clear-num89.3%
associate-/r/89.2%
Applied egg-rr89.2%
Taylor expanded in y around inf 59.3%
div-sub59.3%
*-commutative59.3%
Simplified59.3%
if -6.4000000000000001e-186 < z < 1.55e18Initial program 90.9%
Taylor expanded in t around 0 65.7%
neg-mul-165.7%
distribute-neg-frac65.7%
Simplified65.7%
Taylor expanded in z around 0 61.3%
+-commutative61.3%
mul-1-neg61.3%
unsub-neg61.3%
associate-/l*60.6%
Simplified60.6%
Final simplification59.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.5e+43) (not (<= z 2.2e+60))) (/ (- t) (+ -1.0 (/ a z))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.5e+43) || !(z <= 2.2e+60)) {
tmp = -t / (-1.0 + (a / z));
} else {
tmp = x + (y / (a / (t - 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 ((z <= (-3.5d+43)) .or. (.not. (z <= 2.2d+60))) then
tmp = -t / ((-1.0d0) + (a / z))
else
tmp = x + (y / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.5e+43) || !(z <= 2.2e+60)) {
tmp = -t / (-1.0 + (a / z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.5e+43) or not (z <= 2.2e+60): tmp = -t / (-1.0 + (a / z)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.5e+43) || !(z <= 2.2e+60)) tmp = Float64(Float64(-t) / Float64(-1.0 + Float64(a / z))); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.5e+43) || ~((z <= 2.2e+60))) tmp = -t / (-1.0 + (a / z)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.5e+43], N[Not[LessEqual[z, 2.2e+60]], $MachinePrecision]], N[((-t) / N[(-1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+43} \lor \neg \left(z \leq 2.2 \cdot 10^{+60}\right):\\
\;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -3.5000000000000001e43 or 2.19999999999999996e60 < z Initial program 66.6%
Taylor expanded in y around 0 37.2%
mul-1-neg37.2%
unsub-neg37.2%
*-commutative37.2%
associate-/l*58.8%
div-sub58.8%
*-inverses58.8%
Simplified58.8%
Taylor expanded in x around 0 62.1%
sub-neg62.1%
metadata-eval62.1%
associate-*r/62.1%
mul-1-neg62.1%
+-commutative62.1%
Simplified62.1%
if -3.5000000000000001e43 < z < 2.19999999999999996e60Initial program 90.5%
Taylor expanded in z around 0 65.8%
+-commutative65.8%
associate-/l*70.1%
Simplified70.1%
Final simplification66.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9e+42) (not (<= z 1.5e+61))) (/ (- t) (+ -1.0 (/ a z))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9e+42) || !(z <= 1.5e+61)) {
tmp = -t / (-1.0 + (a / z));
} else {
tmp = x + ((t - x) / (a / y));
}
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 ((z <= (-9d+42)) .or. (.not. (z <= 1.5d+61))) then
tmp = -t / ((-1.0d0) + (a / z))
else
tmp = x + ((t - x) / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9e+42) || !(z <= 1.5e+61)) {
tmp = -t / (-1.0 + (a / z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9e+42) or not (z <= 1.5e+61): tmp = -t / (-1.0 + (a / z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9e+42) || !(z <= 1.5e+61)) tmp = Float64(Float64(-t) / Float64(-1.0 + Float64(a / z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9e+42) || ~((z <= 1.5e+61))) tmp = -t / (-1.0 + (a / z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9e+42], N[Not[LessEqual[z, 1.5e+61]], $MachinePrecision]], N[((-t) / N[(-1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+42} \lor \neg \left(z \leq 1.5 \cdot 10^{+61}\right):\\
\;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -9.00000000000000025e42 or 1.5e61 < z Initial program 66.6%
Taylor expanded in y around 0 37.2%
mul-1-neg37.2%
unsub-neg37.2%
*-commutative37.2%
associate-/l*58.8%
div-sub58.8%
*-inverses58.8%
Simplified58.8%
Taylor expanded in x around 0 62.1%
sub-neg62.1%
metadata-eval62.1%
associate-*r/62.1%
mul-1-neg62.1%
+-commutative62.1%
Simplified62.1%
if -9.00000000000000025e42 < z < 1.5e61Initial program 90.5%
*-commutative90.5%
associate-*l/86.9%
associate-*r/93.3%
clear-num93.1%
un-div-inv93.1%
Applied egg-rr93.1%
Taylor expanded in z around 0 71.6%
Final simplification67.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8e+41) (not (<= z 1.45e+18))) (/ t (/ (- a z) (- y z))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e+41) || !(z <= 1.45e+18)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x + ((t - x) / (a / y));
}
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 ((z <= (-8d+41)) .or. (.not. (z <= 1.45d+18))) then
tmp = t / ((a - z) / (y - z))
else
tmp = x + ((t - x) / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e+41) || !(z <= 1.45e+18)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8e+41) or not (z <= 1.45e+18): tmp = t / ((a - z) / (y - z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8e+41) || !(z <= 1.45e+18)) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8e+41) || ~((z <= 1.45e+18))) tmp = t / ((a - z) / (y - z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8e+41], N[Not[LessEqual[z, 1.45e+18]], $MachinePrecision]], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+41} \lor \neg \left(z \leq 1.45 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -8.00000000000000005e41 or 1.45e18 < z Initial program 68.9%
Taylor expanded in x around 0 48.2%
associate-/l*65.6%
Simplified65.6%
if -8.00000000000000005e41 < z < 1.45e18Initial program 90.5%
*-commutative90.5%
associate-*l/87.9%
associate-*r/93.4%
clear-num93.2%
un-div-inv93.3%
Applied egg-rr93.3%
Taylor expanded in z around 0 73.3%
Final simplification69.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e+44) (not (<= z 1.5e+18))) (/ (- t) (+ -1.0 (/ a z))) (- x (/ y (/ a x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+44) || !(z <= 1.5e+18)) {
tmp = -t / (-1.0 + (a / z));
} else {
tmp = x - (y / (a / 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 ((z <= (-1.45d+44)) .or. (.not. (z <= 1.5d+18))) then
tmp = -t / ((-1.0d0) + (a / z))
else
tmp = x - (y / (a / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+44) || !(z <= 1.5e+18)) {
tmp = -t / (-1.0 + (a / z));
} else {
tmp = x - (y / (a / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e+44) or not (z <= 1.5e+18): tmp = -t / (-1.0 + (a / z)) else: tmp = x - (y / (a / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e+44) || !(z <= 1.5e+18)) tmp = Float64(Float64(-t) / Float64(-1.0 + Float64(a / z))); else tmp = Float64(x - Float64(y / Float64(a / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.45e+44) || ~((z <= 1.5e+18))) tmp = -t / (-1.0 + (a / z)); else tmp = x - (y / (a / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e+44], N[Not[LessEqual[z, 1.5e+18]], $MachinePrecision]], N[((-t) / N[(-1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+44} \lor \neg \left(z \leq 1.5 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{x}}\\
\end{array}
\end{array}
if z < -1.4500000000000001e44 or 1.5e18 < z Initial program 68.9%
Taylor expanded in y around 0 36.6%
mul-1-neg36.6%
unsub-neg36.6%
*-commutative36.6%
associate-/l*57.7%
div-sub57.8%
*-inverses57.8%
Simplified57.8%
Taylor expanded in x around 0 60.0%
sub-neg60.0%
metadata-eval60.0%
associate-*r/60.0%
mul-1-neg60.0%
+-commutative60.0%
Simplified60.0%
if -1.4500000000000001e44 < z < 1.5e18Initial program 90.5%
Taylor expanded in t around 0 61.1%
neg-mul-161.1%
distribute-neg-frac61.1%
Simplified61.1%
Taylor expanded in z around 0 52.0%
+-commutative52.0%
mul-1-neg52.0%
unsub-neg52.0%
associate-/l*53.7%
Simplified53.7%
Final simplification56.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.25e+42) (not (<= z 1.6e+18))) (/ t (/ z (- z y))) (- x (/ y (/ a x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.25e+42) || !(z <= 1.6e+18)) {
tmp = t / (z / (z - y));
} else {
tmp = x - (y / (a / 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 ((z <= (-1.25d+42)) .or. (.not. (z <= 1.6d+18))) then
tmp = t / (z / (z - y))
else
tmp = x - (y / (a / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.25e+42) || !(z <= 1.6e+18)) {
tmp = t / (z / (z - y));
} else {
tmp = x - (y / (a / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.25e+42) or not (z <= 1.6e+18): tmp = t / (z / (z - y)) else: tmp = x - (y / (a / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.25e+42) || !(z <= 1.6e+18)) tmp = Float64(t / Float64(z / Float64(z - y))); else tmp = Float64(x - Float64(y / Float64(a / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.25e+42) || ~((z <= 1.6e+18))) tmp = t / (z / (z - y)); else tmp = x - (y / (a / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.25e+42], N[Not[LessEqual[z, 1.6e+18]], $MachinePrecision]], N[(t / N[(z / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+42} \lor \neg \left(z \leq 1.6 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{t}{\frac{z}{z - y}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{x}}\\
\end{array}
\end{array}
if z < -1.25000000000000002e42 or 1.6e18 < z Initial program 68.9%
Taylor expanded in x around 0 48.2%
Taylor expanded in a around 0 42.9%
associate-*r/42.9%
neg-mul-142.9%
distribute-rgt-neg-in42.9%
Simplified42.9%
Taylor expanded in t around 0 42.9%
associate-/l*55.9%
Simplified55.9%
if -1.25000000000000002e42 < z < 1.6e18Initial program 90.5%
Taylor expanded in t around 0 61.1%
neg-mul-161.1%
distribute-neg-frac61.1%
Simplified61.1%
Taylor expanded in z around 0 52.0%
+-commutative52.0%
mul-1-neg52.0%
unsub-neg52.0%
associate-/l*53.7%
Simplified53.7%
Final simplification54.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.55e+43) t (if (<= z 1.55e+18) (- x (/ y (/ a x))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.55e+43) {
tmp = t;
} else if (z <= 1.55e+18) {
tmp = x - (y / (a / x));
} else {
tmp = t;
}
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 (z <= (-1.55d+43)) then
tmp = t
else if (z <= 1.55d+18) then
tmp = x - (y / (a / x))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.55e+43) {
tmp = t;
} else if (z <= 1.55e+18) {
tmp = x - (y / (a / x));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.55e+43: tmp = t elif z <= 1.55e+18: tmp = x - (y / (a / x)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.55e+43) tmp = t; elseif (z <= 1.55e+18) tmp = Float64(x - Float64(y / Float64(a / x))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.55e+43) tmp = t; elseif (z <= 1.55e+18) tmp = x - (y / (a / x)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.55e+43], t, If[LessEqual[z, 1.55e+18], N[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+43}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+18}:\\
\;\;\;\;x - \frac{y}{\frac{a}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.5500000000000001e43 or 1.55e18 < z Initial program 68.9%
Taylor expanded in z around inf 52.6%
if -1.5500000000000001e43 < z < 1.55e18Initial program 90.5%
Taylor expanded in t around 0 61.1%
neg-mul-161.1%
distribute-neg-frac61.1%
Simplified61.1%
Taylor expanded in z around 0 52.0%
+-commutative52.0%
mul-1-neg52.0%
unsub-neg52.0%
associate-/l*53.7%
Simplified53.7%
Final simplification53.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.5e+42) t (if (<= z 1.4e+18) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+42) {
tmp = t;
} else if (z <= 1.4e+18) {
tmp = x;
} else {
tmp = t;
}
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 (z <= (-6.5d+42)) then
tmp = t
else if (z <= 1.4d+18) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+42) {
tmp = t;
} else if (z <= 1.4e+18) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e+42: tmp = t elif z <= 1.4e+18: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e+42) tmp = t; elseif (z <= 1.4e+18) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e+42) tmp = t; elseif (z <= 1.4e+18) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e+42], t, If[LessEqual[z, 1.4e+18], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+42}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+18}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.50000000000000052e42 or 1.4e18 < z Initial program 68.9%
Taylor expanded in z around inf 52.6%
if -6.50000000000000052e42 < z < 1.4e18Initial program 90.5%
Taylor expanded in a around inf 37.1%
Final simplification44.3%
(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 80.5%
Taylor expanded in t around 0 43.0%
neg-mul-143.0%
distribute-neg-frac43.0%
Simplified43.0%
Taylor expanded in z around inf 2.9%
distribute-lft1-in2.9%
metadata-eval2.9%
mul0-lft2.9%
Simplified2.9%
Final simplification2.9%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 80.5%
Taylor expanded in z around inf 28.9%
Final simplification28.9%
herbie shell --seed 2023200
(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)))))