
(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 19 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 (if (or (<= z -1.9e+161) (not (<= z 3e+120))) (+ t (* (- t x) (/ (- a y) z))) (fma (- t x) (/ (- y z) (- a z)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e+161) || !(z <= 3e+120)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = fma((t - x), ((y - z) / (a - z)), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.9e+161) || !(z <= 3e+120)) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.9e+161], N[Not[LessEqual[z, 3e+120]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+161} \lor \neg \left(z \leq 3 \cdot 10^{+120}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\end{array}
\end{array}
if z < -1.9000000000000001e161 or 3e120 < z Initial program 18.7%
associate-/l*57.0%
Simplified57.0%
+-commutative57.0%
associate-*r/18.7%
div-inv18.8%
fma-define18.7%
Applied egg-rr18.7%
Taylor expanded in z around inf 59.4%
associate--l+59.4%
distribute-lft-out--59.4%
div-sub59.4%
mul-1-neg59.4%
unsub-neg59.4%
distribute-rgt-out--59.6%
associate-/l*90.5%
Simplified90.5%
if -1.9000000000000001e161 < z < 3e120Initial program 87.3%
+-commutative87.3%
*-commutative87.3%
associate-/l*94.5%
fma-define94.5%
Simplified94.5%
Final simplification93.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= z -2.7e+41)
t
(if (<= z -8e-179)
x
(if (<= z -2.2e-230)
t_1
(if (<= z -4.6e-279)
(* (/ y a) (- x))
(if (<= z 1.55e-233) t_1 (if (<= z 2.6e+118) x t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (z <= -2.7e+41) {
tmp = t;
} else if (z <= -8e-179) {
tmp = x;
} else if (z <= -2.2e-230) {
tmp = t_1;
} else if (z <= -4.6e-279) {
tmp = (y / a) * -x;
} else if (z <= 1.55e-233) {
tmp = t_1;
} else if (z <= 2.6e+118) {
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 = t * (y / a)
if (z <= (-2.7d+41)) then
tmp = t
else if (z <= (-8d-179)) then
tmp = x
else if (z <= (-2.2d-230)) then
tmp = t_1
else if (z <= (-4.6d-279)) then
tmp = (y / a) * -x
else if (z <= 1.55d-233) then
tmp = t_1
else if (z <= 2.6d+118) 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 = t * (y / a);
double tmp;
if (z <= -2.7e+41) {
tmp = t;
} else if (z <= -8e-179) {
tmp = x;
} else if (z <= -2.2e-230) {
tmp = t_1;
} else if (z <= -4.6e-279) {
tmp = (y / a) * -x;
} else if (z <= 1.55e-233) {
tmp = t_1;
} else if (z <= 2.6e+118) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if z <= -2.7e+41: tmp = t elif z <= -8e-179: tmp = x elif z <= -2.2e-230: tmp = t_1 elif z <= -4.6e-279: tmp = (y / a) * -x elif z <= 1.55e-233: tmp = t_1 elif z <= 2.6e+118: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (z <= -2.7e+41) tmp = t; elseif (z <= -8e-179) tmp = x; elseif (z <= -2.2e-230) tmp = t_1; elseif (z <= -4.6e-279) tmp = Float64(Float64(y / a) * Float64(-x)); elseif (z <= 1.55e-233) tmp = t_1; elseif (z <= 2.6e+118) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (z <= -2.7e+41) tmp = t; elseif (z <= -8e-179) tmp = x; elseif (z <= -2.2e-230) tmp = t_1; elseif (z <= -4.6e-279) tmp = (y / a) * -x; elseif (z <= 1.55e-233) tmp = t_1; elseif (z <= 2.6e+118) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+41], t, If[LessEqual[z, -8e-179], x, If[LessEqual[z, -2.2e-230], t$95$1, If[LessEqual[z, -4.6e-279], N[(N[(y / a), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[z, 1.55e-233], t$95$1, If[LessEqual[z, 2.6e+118], x, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+41}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-179}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-279}:\\
\;\;\;\;\frac{y}{a} \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-233}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.7e41 or 2.60000000000000016e118 < z Initial program 32.7%
associate-/l*66.9%
Simplified66.9%
Taylor expanded in z around inf 52.2%
if -2.7e41 < z < -8.0000000000000002e-179 or 1.55000000000000007e-233 < z < 2.60000000000000016e118Initial program 88.9%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in a around inf 43.9%
if -8.0000000000000002e-179 < z < -2.1999999999999998e-230 or -4.5999999999999999e-279 < z < 1.55000000000000007e-233Initial program 95.7%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in x around 0 56.5%
Taylor expanded in z around 0 54.5%
associate-*r/58.6%
Simplified58.6%
if -2.1999999999999998e-230 < z < -4.5999999999999999e-279Initial program 91.5%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around 0 88.0%
associate-*r/88.0%
mul-1-neg88.0%
distribute-lft-neg-out88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in y around inf 65.9%
associate-*r/65.9%
associate-*r*65.9%
mul-1-neg65.9%
Simplified65.9%
Taylor expanded in a around inf 65.9%
mul-1-neg65.9%
associate-/l*74.4%
distribute-lft-neg-in74.4%
Simplified74.4%
Final simplification50.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.5e+177)
(* t (- 1.0 (/ y z)))
(if (<= z -6.8e+84)
(* t (/ (- y z) a))
(if (or (<= z -7.5e-59) (not (<= z 8.2e+119)))
(- t (* t (/ y z)))
(+ x (* t (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e+177) {
tmp = t * (1.0 - (y / z));
} else if (z <= -6.8e+84) {
tmp = t * ((y - z) / a);
} else if ((z <= -7.5e-59) || !(z <= 8.2e+119)) {
tmp = t - (t * (y / z));
} else {
tmp = x + (t * (y / a));
}
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 <= (-5.5d+177)) then
tmp = t * (1.0d0 - (y / z))
else if (z <= (-6.8d+84)) then
tmp = t * ((y - z) / a)
else if ((z <= (-7.5d-59)) .or. (.not. (z <= 8.2d+119))) then
tmp = t - (t * (y / z))
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e+177) {
tmp = t * (1.0 - (y / z));
} else if (z <= -6.8e+84) {
tmp = t * ((y - z) / a);
} else if ((z <= -7.5e-59) || !(z <= 8.2e+119)) {
tmp = t - (t * (y / z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.5e+177: tmp = t * (1.0 - (y / z)) elif z <= -6.8e+84: tmp = t * ((y - z) / a) elif (z <= -7.5e-59) or not (z <= 8.2e+119): tmp = t - (t * (y / z)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.5e+177) tmp = Float64(t * Float64(1.0 - Float64(y / z))); elseif (z <= -6.8e+84) tmp = Float64(t * Float64(Float64(y - z) / a)); elseif ((z <= -7.5e-59) || !(z <= 8.2e+119)) tmp = Float64(t - Float64(t * Float64(y / z))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.5e+177) tmp = t * (1.0 - (y / z)); elseif (z <= -6.8e+84) tmp = t * ((y - z) / a); elseif ((z <= -7.5e-59) || ~((z <= 8.2e+119))) tmp = t - (t * (y / z)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.5e+177], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.8e+84], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -7.5e-59], N[Not[LessEqual[z, 8.2e+119]], $MachinePrecision]], N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+177}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{+84}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-59} \lor \neg \left(z \leq 8.2 \cdot 10^{+119}\right):\\
\;\;\;\;t - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -5.49999999999999993e177Initial program 21.5%
associate-/l*55.0%
Simplified55.0%
Taylor expanded in a around 0 21.2%
mul-1-neg21.2%
unsub-neg21.2%
associate-/l*57.8%
div-sub57.9%
sub-neg57.9%
*-inverses57.9%
metadata-eval57.9%
Simplified57.9%
Taylor expanded in t around inf 78.8%
if -5.49999999999999993e177 < z < -6.7999999999999996e84Initial program 53.2%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in x around 0 45.3%
Taylor expanded in a around inf 34.2%
associate-/l*49.2%
Simplified49.2%
if -6.7999999999999996e84 < z < -7.50000000000000019e-59 or 8.1999999999999994e119 < z Initial program 51.9%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in a around 0 33.4%
mul-1-neg33.4%
unsub-neg33.4%
associate-/l*52.2%
div-sub52.2%
sub-neg52.2%
*-inverses52.2%
metadata-eval52.2%
Simplified52.2%
Taylor expanded in t around inf 58.0%
sub-neg58.0%
distribute-rgt-in58.0%
*-un-lft-identity58.0%
distribute-neg-frac58.0%
Applied egg-rr58.0%
if -7.50000000000000019e-59 < z < 8.1999999999999994e119Initial program 91.4%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in z around 0 73.3%
Taylor expanded in t around inf 62.9%
associate-/l*65.3%
Simplified65.3%
Final simplification63.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= z -5.5e+177)
t_1
(if (<= z -6.8e+84)
(* t (/ (- y z) a))
(if (or (<= z -8.2e-59) (not (<= z 6e+119)))
t_1
(+ x (* t (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -5.5e+177) {
tmp = t_1;
} else if (z <= -6.8e+84) {
tmp = t * ((y - z) / a);
} else if ((z <= -8.2e-59) || !(z <= 6e+119)) {
tmp = t_1;
} else {
tmp = x + (t * (y / a));
}
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 - (y / z))
if (z <= (-5.5d+177)) then
tmp = t_1
else if (z <= (-6.8d+84)) then
tmp = t * ((y - z) / a)
else if ((z <= (-8.2d-59)) .or. (.not. (z <= 6d+119))) then
tmp = t_1
else
tmp = x + (t * (y / a))
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 - (y / z));
double tmp;
if (z <= -5.5e+177) {
tmp = t_1;
} else if (z <= -6.8e+84) {
tmp = t * ((y - z) / a);
} else if ((z <= -8.2e-59) || !(z <= 6e+119)) {
tmp = t_1;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if z <= -5.5e+177: tmp = t_1 elif z <= -6.8e+84: tmp = t * ((y - z) / a) elif (z <= -8.2e-59) or not (z <= 6e+119): tmp = t_1 else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -5.5e+177) tmp = t_1; elseif (z <= -6.8e+84) tmp = Float64(t * Float64(Float64(y - z) / a)); elseif ((z <= -8.2e-59) || !(z <= 6e+119)) tmp = t_1; else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -5.5e+177) tmp = t_1; elseif (z <= -6.8e+84) tmp = t * ((y - z) / a); elseif ((z <= -8.2e-59) || ~((z <= 6e+119))) tmp = t_1; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e+177], t$95$1, If[LessEqual[z, -6.8e+84], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -8.2e-59], N[Not[LessEqual[z, 6e+119]], $MachinePrecision]], t$95$1, N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+177}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{+84}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-59} \lor \neg \left(z \leq 6 \cdot 10^{+119}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -5.49999999999999993e177 or -6.7999999999999996e84 < z < -8.1999999999999991e-59 or 6.00000000000000002e119 < z Initial program 43.3%
associate-/l*69.6%
Simplified69.6%
Taylor expanded in a around 0 30.0%
mul-1-neg30.0%
unsub-neg30.0%
associate-/l*53.8%
div-sub53.8%
sub-neg53.8%
*-inverses53.8%
metadata-eval53.8%
Simplified53.8%
Taylor expanded in t around inf 63.9%
if -5.49999999999999993e177 < z < -6.7999999999999996e84Initial program 53.2%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in x around 0 45.3%
Taylor expanded in a around inf 34.2%
associate-/l*49.2%
Simplified49.2%
if -8.1999999999999991e-59 < z < 6.00000000000000002e119Initial program 91.4%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in z around 0 73.3%
Taylor expanded in t around inf 62.9%
associate-/l*65.3%
Simplified65.3%
Final simplification63.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.3e+116)
(/ t (/ (- a z) (- y z)))
(if (or (<= z -1.4e-146) (not (<= z 66000.0)))
(+ x (* (- y z) (/ t (- a z))))
(+ x (/ (- t x) (/ a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.3e+116) {
tmp = t / ((a - z) / (y - z));
} else if ((z <= -1.4e-146) || !(z <= 66000.0)) {
tmp = x + ((y - z) * (t / (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 <= (-4.3d+116)) then
tmp = t / ((a - z) / (y - z))
else if ((z <= (-1.4d-146)) .or. (.not. (z <= 66000.0d0))) then
tmp = x + ((y - z) * (t / (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 <= -4.3e+116) {
tmp = t / ((a - z) / (y - z));
} else if ((z <= -1.4e-146) || !(z <= 66000.0)) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.3e+116: tmp = t / ((a - z) / (y - z)) elif (z <= -1.4e-146) or not (z <= 66000.0): tmp = x + ((y - z) * (t / (a - z))) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.3e+116) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); elseif ((z <= -1.4e-146) || !(z <= 66000.0)) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / 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 <= -4.3e+116) tmp = t / ((a - z) / (y - z)); elseif ((z <= -1.4e-146) || ~((z <= 66000.0))) tmp = x + ((y - z) * (t / (a - z))); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.3e+116], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.4e-146], N[Not[LessEqual[z, 66000.0]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $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 -4.3 \cdot 10^{+116}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-146} \lor \neg \left(z \leq 66000\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -4.3e116Initial program 29.0%
associate-/l*58.4%
Simplified58.4%
associate-*r/29.0%
clear-num28.9%
associate-/r*66.0%
Applied egg-rr66.0%
Taylor expanded in x around 0 44.8%
*-commutative44.8%
associate-*r/64.7%
*-commutative64.7%
associate-/r/80.8%
Simplified80.8%
if -4.3e116 < z < -1.40000000000000001e-146 or 66000 < z Initial program 66.9%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in t around inf 72.8%
if -1.40000000000000001e-146 < z < 66000Initial program 93.8%
associate-/l*93.8%
Simplified93.8%
*-commutative93.8%
associate-*l/93.8%
associate-*r/99.0%
clear-num98.9%
un-div-inv98.9%
Applied egg-rr98.9%
Taylor expanded in z around 0 88.2%
Final simplification80.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (- t x) (/ (- a y) z)))))
(if (<= z -4.5e+160)
t_1
(if (<= z -1.7e-71)
(+ x (* (- y z) (/ t (- a z))))
(if (<= z 2.6e+118) (+ x (/ (- t x) (/ (- a z) y))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((t - x) * ((a - y) / z));
double tmp;
if (z <= -4.5e+160) {
tmp = t_1;
} else if (z <= -1.7e-71) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 2.6e+118) {
tmp = x + ((t - x) / ((a - z) / y));
} 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 + ((t - x) * ((a - y) / z))
if (z <= (-4.5d+160)) then
tmp = t_1
else if (z <= (-1.7d-71)) then
tmp = x + ((y - z) * (t / (a - z)))
else if (z <= 2.6d+118) then
tmp = x + ((t - x) / ((a - z) / y))
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) * ((a - y) / z));
double tmp;
if (z <= -4.5e+160) {
tmp = t_1;
} else if (z <= -1.7e-71) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 2.6e+118) {
tmp = x + ((t - x) / ((a - z) / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((t - x) * ((a - y) / z)) tmp = 0 if z <= -4.5e+160: tmp = t_1 elif z <= -1.7e-71: tmp = x + ((y - z) * (t / (a - z))) elif z <= 2.6e+118: tmp = x + ((t - x) / ((a - z) / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))) tmp = 0.0 if (z <= -4.5e+160) tmp = t_1; elseif (z <= -1.7e-71) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (z <= 2.6e+118) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((t - x) * ((a - y) / z)); tmp = 0.0; if (z <= -4.5e+160) tmp = t_1; elseif (z <= -1.7e-71) tmp = x + ((y - z) * (t / (a - z))); elseif (z <= 2.6e+118) tmp = x + ((t - x) / ((a - z) / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+160], t$95$1, If[LessEqual[z, -1.7e-71], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+118], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-71}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.4999999999999998e160 or 2.60000000000000016e118 < z Initial program 20.1%
associate-/l*58.6%
Simplified58.6%
+-commutative58.6%
associate-*r/20.1%
div-inv20.2%
fma-define20.1%
Applied egg-rr20.1%
Taylor expanded in z around inf 59.1%
associate--l+59.1%
distribute-lft-out--59.1%
div-sub59.1%
mul-1-neg59.1%
unsub-neg59.1%
distribute-rgt-out--59.5%
associate-/l*90.8%
Simplified90.8%
if -4.4999999999999998e160 < z < -1.70000000000000002e-71Initial program 73.4%
associate-/l*88.1%
Simplified88.1%
Taylor expanded in t around inf 78.6%
if -1.70000000000000002e-71 < z < 2.60000000000000016e118Initial program 92.3%
associate-/l*92.9%
Simplified92.9%
*-commutative92.9%
associate-*l/92.3%
associate-*r/96.6%
clear-num96.5%
un-div-inv96.6%
Applied egg-rr96.6%
Taylor expanded in y around inf 90.4%
Final simplification88.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ t (/ (- a z) (- y z)))))
(if (<= z -4e+116)
t_1
(if (<= z -3.5e-68)
(+ x (* (- y z) (/ t (- a z))))
(if (<= z 8.2e+132) (+ x (/ (- t x) (/ (- a z) y))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t / ((a - z) / (y - z));
double tmp;
if (z <= -4e+116) {
tmp = t_1;
} else if (z <= -3.5e-68) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 8.2e+132) {
tmp = x + ((t - x) / ((a - z) / y));
} 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 / ((a - z) / (y - z))
if (z <= (-4d+116)) then
tmp = t_1
else if (z <= (-3.5d-68)) then
tmp = x + ((y - z) * (t / (a - z)))
else if (z <= 8.2d+132) then
tmp = x + ((t - x) / ((a - z) / y))
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 / ((a - z) / (y - z));
double tmp;
if (z <= -4e+116) {
tmp = t_1;
} else if (z <= -3.5e-68) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 8.2e+132) {
tmp = x + ((t - x) / ((a - z) / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t / ((a - z) / (y - z)) tmp = 0 if z <= -4e+116: tmp = t_1 elif z <= -3.5e-68: tmp = x + ((y - z) * (t / (a - z))) elif z <= 8.2e+132: tmp = x + ((t - x) / ((a - z) / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t / Float64(Float64(a - z) / Float64(y - z))) tmp = 0.0 if (z <= -4e+116) tmp = t_1; elseif (z <= -3.5e-68) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (z <= 8.2e+132) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t / ((a - z) / (y - z)); tmp = 0.0; if (z <= -4e+116) tmp = t_1; elseif (z <= -3.5e-68) tmp = x + ((y - z) * (t / (a - z))); elseif (z <= 8.2e+132) tmp = x + ((t - x) / ((a - z) / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+116], t$95$1, If[LessEqual[z, -3.5e-68], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+132], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a - z}{y - z}}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-68}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+132}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.00000000000000006e116 or 8.19999999999999983e132 < z Initial program 24.7%
associate-/l*60.1%
Simplified60.1%
associate-*r/24.7%
clear-num24.6%
associate-/r*64.7%
Applied egg-rr64.7%
Taylor expanded in x around 0 38.3%
*-commutative38.3%
associate-*r/64.1%
*-commutative64.1%
associate-/r/75.8%
Simplified75.8%
if -4.00000000000000006e116 < z < -3.50000000000000013e-68Initial program 75.8%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in t around inf 81.4%
if -3.50000000000000013e-68 < z < 8.19999999999999983e132Initial program 91.3%
associate-/l*92.4%
Simplified92.4%
*-commutative92.4%
associate-*l/91.3%
associate-*r/96.0%
clear-num96.0%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in y around inf 89.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -2e-60)
t_1
(if (<= z 3.5e-243)
(+ x (* t (/ y a)))
(if (<= z 8.7e+120) (* x (- 1.0 (/ y (- a z)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2e-60) {
tmp = t_1;
} else if (z <= 3.5e-243) {
tmp = x + (t * (y / a));
} else if (z <= 8.7e+120) {
tmp = x * (1.0 - (y / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
if (z <= (-2d-60)) then
tmp = t_1
else if (z <= 3.5d-243) then
tmp = x + (t * (y / a))
else if (z <= 8.7d+120) then
tmp = x * (1.0d0 - (y / (a - z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2e-60) {
tmp = t_1;
} else if (z <= 3.5e-243) {
tmp = x + (t * (y / a));
} else if (z <= 8.7e+120) {
tmp = x * (1.0 - (y / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -2e-60: tmp = t_1 elif z <= 3.5e-243: tmp = x + (t * (y / a)) elif z <= 8.7e+120: tmp = x * (1.0 - (y / (a - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -2e-60) tmp = t_1; elseif (z <= 3.5e-243) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 8.7e+120) tmp = Float64(x * Float64(1.0 - Float64(y / Float64(a - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -2e-60) tmp = t_1; elseif (z <= 3.5e-243) tmp = x + (t * (y / a)); elseif (z <= 8.7e+120) tmp = x * (1.0 - (y / (a - z))); 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[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e-60], t$95$1, If[LessEqual[z, 3.5e-243], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.7e+120], N[(x * N[(1.0 - N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -2 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-243}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 8.7 \cdot 10^{+120}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a - z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.9999999999999999e-60 or 8.70000000000000043e120 < z Initial program 45.6%
associate-/l*72.3%
Simplified72.3%
Taylor expanded in x around 0 46.7%
associate-/l*71.8%
Simplified71.8%
if -1.9999999999999999e-60 < z < 3.49999999999999979e-243Initial program 92.8%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in z around 0 80.2%
Taylor expanded in t around inf 66.3%
associate-/l*69.9%
Simplified69.9%
if 3.49999999999999979e-243 < z < 8.70000000000000043e120Initial program 88.7%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in t around 0 68.7%
associate-*r/68.7%
mul-1-neg68.7%
distribute-lft-neg-out68.7%
*-commutative68.7%
Simplified68.7%
Taylor expanded in y around inf 66.7%
associate-*r*66.7%
mul-1-neg66.7%
Simplified66.7%
Taylor expanded in x around 0 70.4%
mul-1-neg70.4%
unsub-neg70.4%
Simplified70.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.9e+161) (not (<= z 1.8e+120))) (+ 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 tmp;
if ((z <= -2.9e+161) || !(z <= 1.8e+120)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((t - x) / ((a - z) / (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) :: tmp
if ((z <= (-2.9d+161)) .or. (.not. (z <= 1.8d+120))) then
tmp = t + ((t - x) * ((a - y) / z))
else
tmp = x + ((t - x) / ((a - z) / (y - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.9e+161) || !(z <= 1.8e+120)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.9e+161) or not (z <= 1.8e+120): 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) tmp = 0.0 if ((z <= -2.9e+161) || !(z <= 1.8e+120)) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.9e+161) || ~((z <= 1.8e+120))) tmp = t + ((t - x) * ((a - y) / z)); else tmp = x + ((t - x) / ((a - z) / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.9e+161], N[Not[LessEqual[z, 1.8e+120]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $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}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+161} \lor \neg \left(z \leq 1.8 \cdot 10^{+120}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if z < -2.90000000000000016e161 or 1.80000000000000008e120 < z Initial program 18.7%
associate-/l*57.0%
Simplified57.0%
+-commutative57.0%
associate-*r/18.7%
div-inv18.8%
fma-define18.7%
Applied egg-rr18.7%
Taylor expanded in z around inf 59.4%
associate--l+59.4%
distribute-lft-out--59.4%
div-sub59.4%
mul-1-neg59.4%
unsub-neg59.4%
distribute-rgt-out--59.6%
associate-/l*90.5%
Simplified90.5%
if -2.90000000000000016e161 < z < 1.80000000000000008e120Initial program 87.3%
associate-/l*91.7%
Simplified91.7%
*-commutative91.7%
associate-*l/87.3%
associate-*r/94.5%
clear-num94.4%
un-div-inv94.5%
Applied egg-rr94.5%
Final simplification93.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.2e+159) (not (<= z 2.6e+120))) (+ t (* (- t x) (/ (- a y) z))) (+ x (* (- y z) (/ (- t x) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.2e+159) || !(z <= 2.6e+120)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) * ((t - x) / (a - 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) :: tmp
if ((z <= (-2.2d+159)) .or. (.not. (z <= 2.6d+120))) then
tmp = t + ((t - x) * ((a - y) / z))
else
tmp = x + ((y - z) * ((t - x) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.2e+159) || !(z <= 2.6e+120)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) * ((t - x) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.2e+159) or not (z <= 2.6e+120): tmp = t + ((t - x) * ((a - y) / z)) else: tmp = x + ((y - z) * ((t - x) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.2e+159) || !(z <= 2.6e+120)) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.2e+159) || ~((z <= 2.6e+120))) tmp = t + ((t - x) * ((a - y) / z)); else tmp = x + ((y - z) * ((t - x) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.2e+159], N[Not[LessEqual[z, 2.6e+120]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+159} \lor \neg \left(z \leq 2.6 \cdot 10^{+120}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\end{array}
\end{array}
if z < -2.1999999999999999e159 or 2.5999999999999999e120 < z Initial program 18.7%
associate-/l*57.0%
Simplified57.0%
+-commutative57.0%
associate-*r/18.7%
div-inv18.8%
fma-define18.7%
Applied egg-rr18.7%
Taylor expanded in z around inf 59.4%
associate--l+59.4%
distribute-lft-out--59.4%
div-sub59.4%
mul-1-neg59.4%
unsub-neg59.4%
distribute-rgt-out--59.6%
associate-/l*90.5%
Simplified90.5%
if -2.1999999999999999e159 < z < 2.5999999999999999e120Initial program 87.3%
associate-/l*91.7%
Simplified91.7%
Final simplification91.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2e+45)
t
(if (<= z -3e-179)
x
(if (<= z 2.1e-233) (* t (/ y a)) (if (<= z 2.6e+118) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2e+45) {
tmp = t;
} else if (z <= -3e-179) {
tmp = x;
} else if (z <= 2.1e-233) {
tmp = t * (y / a);
} else if (z <= 2.6e+118) {
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 <= (-2d+45)) then
tmp = t
else if (z <= (-3d-179)) then
tmp = x
else if (z <= 2.1d-233) then
tmp = t * (y / a)
else if (z <= 2.6d+118) 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 <= -2e+45) {
tmp = t;
} else if (z <= -3e-179) {
tmp = x;
} else if (z <= 2.1e-233) {
tmp = t * (y / a);
} else if (z <= 2.6e+118) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2e+45: tmp = t elif z <= -3e-179: tmp = x elif z <= 2.1e-233: tmp = t * (y / a) elif z <= 2.6e+118: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2e+45) tmp = t; elseif (z <= -3e-179) tmp = x; elseif (z <= 2.1e-233) tmp = Float64(t * Float64(y / a)); elseif (z <= 2.6e+118) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2e+45) tmp = t; elseif (z <= -3e-179) tmp = x; elseif (z <= 2.1e-233) tmp = t * (y / a); elseif (z <= 2.6e+118) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2e+45], t, If[LessEqual[z, -3e-179], x, If[LessEqual[z, 2.1e-233], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+118], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+45}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-179}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-233}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.9999999999999999e45 or 2.60000000000000016e118 < z Initial program 32.7%
associate-/l*66.9%
Simplified66.9%
Taylor expanded in z around inf 52.2%
if -1.9999999999999999e45 < z < -3.00000000000000006e-179 or 2.0999999999999999e-233 < z < 2.60000000000000016e118Initial program 88.9%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in a around inf 43.9%
if -3.00000000000000006e-179 < z < 2.0999999999999999e-233Initial program 94.9%
associate-/l*94.9%
Simplified94.9%
Taylor expanded in x around 0 48.3%
Taylor expanded in z around 0 46.7%
associate-*r/51.7%
Simplified51.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.2e-59) (not (<= z 2.6e+118))) (/ 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 <= -8.2e-59) || !(z <= 2.6e+118)) {
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 <= (-8.2d-59)) .or. (.not. (z <= 2.6d+118))) 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 <= -8.2e-59) || !(z <= 2.6e+118)) {
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 <= -8.2e-59) or not (z <= 2.6e+118): 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 <= -8.2e-59) || !(z <= 2.6e+118)) 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 <= -8.2e-59) || ~((z <= 2.6e+118))) 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, -8.2e-59], N[Not[LessEqual[z, 2.6e+118]], $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.2 \cdot 10^{-59} \lor \neg \left(z \leq 2.6 \cdot 10^{+118}\right):\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -8.1999999999999991e-59 or 2.60000000000000016e118 < z Initial program 45.4%
associate-/l*72.1%
Simplified72.1%
associate-*r/45.4%
clear-num45.4%
associate-/r*74.9%
Applied egg-rr74.9%
Taylor expanded in x around 0 45.5%
*-commutative45.5%
associate-*r/64.0%
*-commutative64.0%
associate-/r/70.8%
Simplified70.8%
if -8.1999999999999991e-59 < z < 2.60000000000000016e118Initial program 91.8%
associate-/l*93.0%
Simplified93.0%
*-commutative93.0%
associate-*l/91.8%
associate-*r/96.7%
clear-num96.6%
un-div-inv96.6%
Applied egg-rr96.6%
Taylor expanded in z around 0 79.1%
Final simplification75.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.1e-62) (not (<= z 2.6e+118))) (* t (/ (- y z) (- a z))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.1e-62) || !(z <= 2.6e+118)) {
tmp = t * ((y - z) / (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 <= (-3.1d-62)) .or. (.not. (z <= 2.6d+118))) then
tmp = t * ((y - z) / (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 <= -3.1e-62) || !(z <= 2.6e+118)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.1e-62) or not (z <= 2.6e+118): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.1e-62) || !(z <= 2.6e+118)) tmp = Float64(t * Float64(Float64(y - z) / 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 <= -3.1e-62) || ~((z <= 2.6e+118))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.1e-62], N[Not[LessEqual[z, 2.6e+118]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / 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 -3.1 \cdot 10^{-62} \lor \neg \left(z \leq 2.6 \cdot 10^{+118}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -3.0999999999999999e-62 or 2.60000000000000016e118 < z Initial program 45.4%
associate-/l*72.1%
Simplified72.1%
Taylor expanded in x around 0 45.5%
associate-/l*70.7%
Simplified70.7%
if -3.0999999999999999e-62 < z < 2.60000000000000016e118Initial program 91.8%
associate-/l*93.0%
Simplified93.0%
*-commutative93.0%
associate-*l/91.8%
associate-*r/96.7%
clear-num96.6%
un-div-inv96.6%
Applied egg-rr96.6%
Taylor expanded in z around 0 79.1%
Final simplification75.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.7e-59) (not (<= z 2.6e+118))) (* t (/ (- y z) (- a z))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.7e-59) || !(z <= 2.6e+118)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / a));
}
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 <= (-2.7d-59)) .or. (.not. (z <= 2.6d+118))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y * ((t - x) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.7e-59) || !(z <= 2.6e+118)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.7e-59) or not (z <= 2.6e+118): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.7e-59) || !(z <= 2.6e+118)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.7e-59) || ~((z <= 2.6e+118))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.7e-59], N[Not[LessEqual[z, 2.6e+118]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-59} \lor \neg \left(z \leq 2.6 \cdot 10^{+118}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -2.6999999999999999e-59 or 2.60000000000000016e118 < z Initial program 45.4%
associate-/l*72.1%
Simplified72.1%
Taylor expanded in x around 0 45.5%
associate-/l*70.7%
Simplified70.7%
if -2.6999999999999999e-59 < z < 2.60000000000000016e118Initial program 91.8%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in z around 0 74.2%
associate-/l*76.4%
Simplified76.4%
Final simplification74.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.4e-59) (not (<= z 6e+119))) (* t (/ (- y z) (- a z))) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.4e-59) || !(z <= 6e+119)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (t * (y / a));
}
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.4d-59)) .or. (.not. (z <= 6d+119))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (t * (y / a))
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.4e-59) || !(z <= 6e+119)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.4e-59) or not (z <= 6e+119): tmp = t * ((y - z) / (a - z)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.4e-59) || !(z <= 6e+119)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.4e-59) || ~((z <= 6e+119))) tmp = t * ((y - z) / (a - z)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.4e-59], N[Not[LessEqual[z, 6e+119]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{-59} \lor \neg \left(z \leq 6 \cdot 10^{+119}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.3999999999999999e-59 or 6.00000000000000002e119 < z Initial program 45.2%
associate-/l*71.6%
Simplified71.6%
Taylor expanded in x around 0 46.3%
associate-/l*71.1%
Simplified71.1%
if -1.3999999999999999e-59 < z < 6.00000000000000002e119Initial program 91.4%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in z around 0 73.3%
Taylor expanded in t around inf 62.9%
associate-/l*65.3%
Simplified65.3%
Final simplification67.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -7600000000000.0) x (if (<= a 1.2e+21) (* t (- 1.0 (/ y z))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7600000000000.0) {
tmp = x;
} else if (a <= 1.2e+21) {
tmp = t * (1.0 - (y / z));
} else {
tmp = 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 <= (-7600000000000.0d0)) then
tmp = x
else if (a <= 1.2d+21) then
tmp = t * (1.0d0 - (y / z))
else
tmp = 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 <= -7600000000000.0) {
tmp = x;
} else if (a <= 1.2e+21) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7600000000000.0: tmp = x elif a <= 1.2e+21: tmp = t * (1.0 - (y / z)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7600000000000.0) tmp = x; elseif (a <= 1.2e+21) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7600000000000.0) tmp = x; elseif (a <= 1.2e+21) tmp = t * (1.0 - (y / z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7600000000000.0], x, If[LessEqual[a, 1.2e+21], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7600000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{+21}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -7.6e12 or 1.2e21 < a Initial program 74.2%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in a around inf 49.5%
if -7.6e12 < a < 1.2e21Initial program 72.5%
associate-/l*76.5%
Simplified76.5%
Taylor expanded in a around 0 44.6%
mul-1-neg44.6%
unsub-neg44.6%
associate-/l*54.0%
div-sub54.0%
sub-neg54.0%
*-inverses54.0%
metadata-eval54.0%
Simplified54.0%
Taylor expanded in t around inf 50.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.16e+46) t (if (<= z 2.6e+118) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.16e+46) {
tmp = t;
} else if (z <= 2.6e+118) {
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 <= (-1.16d+46)) then
tmp = t
else if (z <= 2.6d+118) 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 <= -1.16e+46) {
tmp = t;
} else if (z <= 2.6e+118) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.16e+46: tmp = t elif z <= 2.6e+118: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.16e+46) tmp = t; elseif (z <= 2.6e+118) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.16e+46) tmp = t; elseif (z <= 2.6e+118) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.16e+46], t, If[LessEqual[z, 2.6e+118], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{+46}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.1599999999999999e46 or 2.60000000000000016e118 < z Initial program 32.7%
associate-/l*66.9%
Simplified66.9%
Taylor expanded in z around inf 52.2%
if -1.1599999999999999e46 < z < 2.60000000000000016e118Initial program 90.8%
associate-/l*92.4%
Simplified92.4%
Taylor expanded in a around inf 38.1%
(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 73.3%
associate-/l*84.7%
Simplified84.7%
Taylor expanded in z around inf 21.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 73.3%
associate-/l*84.7%
Simplified84.7%
Taylor expanded in t around 0 43.9%
associate-*r/43.9%
mul-1-neg43.9%
distribute-lft-neg-out43.9%
*-commutative43.9%
Simplified43.9%
Taylor expanded in z around inf 2.8%
distribute-rgt1-in2.8%
metadata-eval2.8%
mul0-lft2.8%
Simplified2.8%
(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 2024103
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))
(+ x (/ (* (- y z) (- t x)) (- a z))))