
(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 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(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -1e-274) (not (<= t_1 1e-282)))
(fma (- t x) (/ (- y z) (- a z)) x)
(+ 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-274) || !(t_1 <= 1e-282)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -1e-274) || !(t_1 <= 1e-282)) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-274], N[Not[LessEqual[t$95$1, 1e-282]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $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 + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-274} \lor \neg \left(t\_1 \leq 10^{-282}\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999966e-275 or 1e-282 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 72.4%
+-commutative72.4%
*-commutative72.4%
associate-/l*89.4%
fma-define89.5%
Simplified89.5%
if -9.99999999999999966e-275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1e-282Initial program 5.7%
associate-/l*4.9%
Simplified4.9%
Taylor expanded in z around inf 99.4%
associate--l+99.4%
associate-*r/99.4%
associate-*r/99.4%
mul-1-neg99.4%
div-sub99.3%
mul-1-neg99.3%
distribute-lft-out--99.3%
associate-*r/99.3%
mul-1-neg99.3%
unsub-neg99.3%
distribute-rgt-out--99.4%
Simplified99.4%
Final simplification90.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z)))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 -5e-163)
t_1
(if (<= t_2 1e-282)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= t_2 5e+304) t_2 t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -5e-163) {
tmp = t_1;
} else if (t_2 <= 1e-282) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 5e+304) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
t_2 = x + (((y - z) * (t - x)) / (a - z))
if (t_2 <= (-5d-163)) then
tmp = t_1
else if (t_2 <= 1d-282) then
tmp = t + (((t - x) * (a - y)) / z)
else if (t_2 <= 5d+304) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -5e-163) {
tmp = t_1;
} else if (t_2 <= 1e-282) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 5e+304) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -5e-163: tmp = t_1 elif t_2 <= 1e-282: tmp = t + (((t - x) * (a - y)) / z) elif t_2 <= 5e+304: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= -5e-163) tmp = t_1; elseif (t_2 <= 1e-282) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (t_2 <= 5e+304) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -5e-163) tmp = t_1; elseif (t_2 <= 1e-282) tmp = t + (((t - x) * (a - y)) / z); elseif (t_2 <= 5e+304) tmp = t_2; else tmp = t_1; 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]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-163], t$95$1, If[LessEqual[t$95$2, 1e-282], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+304], t$95$2, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-163}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{-282}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999977e-163 or 4.9999999999999997e304 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 61.4%
associate-/l*86.2%
Simplified86.2%
if -4.99999999999999977e-163 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1e-282Initial program 19.5%
associate-/l*13.0%
Simplified13.0%
Taylor expanded in z around inf 95.6%
associate--l+95.6%
associate-*r/95.6%
associate-*r/95.6%
mul-1-neg95.6%
div-sub95.5%
mul-1-neg95.5%
distribute-lft-out--95.5%
associate-*r/95.5%
mul-1-neg95.5%
unsub-neg95.5%
distribute-rgt-out--95.6%
Simplified95.6%
if 1e-282 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 4.9999999999999997e304Initial program 97.0%
Final simplification90.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y (- a z)))))
(if (<= z -4.5e+71)
t
(if (<= z -1.9e-56)
x
(if (<= z -8.5e-239)
t_1
(if (<= z 1.32e-112) x (if (<= z 1.22e+84) t_1 t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / (a - z));
double tmp;
if (z <= -4.5e+71) {
tmp = t;
} else if (z <= -1.9e-56) {
tmp = x;
} else if (z <= -8.5e-239) {
tmp = t_1;
} else if (z <= 1.32e-112) {
tmp = x;
} else if (z <= 1.22e+84) {
tmp = t_1;
} 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 - z))
if (z <= (-4.5d+71)) then
tmp = t
else if (z <= (-1.9d-56)) then
tmp = x
else if (z <= (-8.5d-239)) then
tmp = t_1
else if (z <= 1.32d-112) then
tmp = x
else if (z <= 1.22d+84) then
tmp = t_1
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 - z));
double tmp;
if (z <= -4.5e+71) {
tmp = t;
} else if (z <= -1.9e-56) {
tmp = x;
} else if (z <= -8.5e-239) {
tmp = t_1;
} else if (z <= 1.32e-112) {
tmp = x;
} else if (z <= 1.22e+84) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / (a - z)) tmp = 0 if z <= -4.5e+71: tmp = t elif z <= -1.9e-56: tmp = x elif z <= -8.5e-239: tmp = t_1 elif z <= 1.32e-112: tmp = x elif z <= 1.22e+84: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / Float64(a - z))) tmp = 0.0 if (z <= -4.5e+71) tmp = t; elseif (z <= -1.9e-56) tmp = x; elseif (z <= -8.5e-239) tmp = t_1; elseif (z <= 1.32e-112) tmp = x; elseif (z <= 1.22e+84) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / (a - z)); tmp = 0.0; if (z <= -4.5e+71) tmp = t; elseif (z <= -1.9e-56) tmp = x; elseif (z <= -8.5e-239) tmp = t_1; elseif (z <= 1.32e-112) tmp = x; elseif (z <= 1.22e+84) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+71], t, If[LessEqual[z, -1.9e-56], x, If[LessEqual[z, -8.5e-239], t$95$1, If[LessEqual[z, 1.32e-112], x, If[LessEqual[z, 1.22e+84], t$95$1, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a - z}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+71}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-56}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-239}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-112}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.50000000000000043e71 or 1.2200000000000001e84 < z Initial program 35.9%
associate-/l*59.9%
Simplified59.9%
Taylor expanded in z around inf 47.8%
if -4.50000000000000043e71 < z < -1.9000000000000001e-56 or -8.49999999999999958e-239 < z < 1.32000000000000008e-112Initial program 88.1%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in a around inf 45.2%
if -1.9000000000000001e-56 < z < -8.49999999999999958e-239 or 1.32000000000000008e-112 < z < 1.2200000000000001e84Initial program 87.5%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in y around inf 63.9%
div-sub66.3%
Simplified66.3%
Taylor expanded in t around inf 38.1%
associate-/l*46.1%
Simplified46.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= z -6.5e+71)
t
(if (<= z -1.85e-58)
x
(if (<= z -1.1e-239)
t_1
(if (<= z 5e-111)
x
(if (<= z 1.3e-28) t_1 (if (<= z 85000000000000.0) x t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (z <= -6.5e+71) {
tmp = t;
} else if (z <= -1.85e-58) {
tmp = x;
} else if (z <= -1.1e-239) {
tmp = t_1;
} else if (z <= 5e-111) {
tmp = x;
} else if (z <= 1.3e-28) {
tmp = t_1;
} else if (z <= 85000000000000.0) {
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 <= (-6.5d+71)) then
tmp = t
else if (z <= (-1.85d-58)) then
tmp = x
else if (z <= (-1.1d-239)) then
tmp = t_1
else if (z <= 5d-111) then
tmp = x
else if (z <= 1.3d-28) then
tmp = t_1
else if (z <= 85000000000000.0d0) 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 <= -6.5e+71) {
tmp = t;
} else if (z <= -1.85e-58) {
tmp = x;
} else if (z <= -1.1e-239) {
tmp = t_1;
} else if (z <= 5e-111) {
tmp = x;
} else if (z <= 1.3e-28) {
tmp = t_1;
} else if (z <= 85000000000000.0) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if z <= -6.5e+71: tmp = t elif z <= -1.85e-58: tmp = x elif z <= -1.1e-239: tmp = t_1 elif z <= 5e-111: tmp = x elif z <= 1.3e-28: tmp = t_1 elif z <= 85000000000000.0: 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 <= -6.5e+71) tmp = t; elseif (z <= -1.85e-58) tmp = x; elseif (z <= -1.1e-239) tmp = t_1; elseif (z <= 5e-111) tmp = x; elseif (z <= 1.3e-28) tmp = t_1; elseif (z <= 85000000000000.0) 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 <= -6.5e+71) tmp = t; elseif (z <= -1.85e-58) tmp = x; elseif (z <= -1.1e-239) tmp = t_1; elseif (z <= 5e-111) tmp = x; elseif (z <= 1.3e-28) tmp = t_1; elseif (z <= 85000000000000.0) 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, -6.5e+71], t, If[LessEqual[z, -1.85e-58], x, If[LessEqual[z, -1.1e-239], t$95$1, If[LessEqual[z, 5e-111], x, If[LessEqual[z, 1.3e-28], t$95$1, If[LessEqual[z, 85000000000000.0], x, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+71}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-58}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-239}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-111}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 85000000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.49999999999999954e71 or 8.5e13 < z Initial program 39.5%
associate-/l*64.0%
Simplified64.0%
Taylor expanded in z around inf 45.3%
if -6.49999999999999954e71 < z < -1.8500000000000001e-58 or -1.09999999999999991e-239 < z < 5.0000000000000003e-111 or 1.3e-28 < z < 8.5e13Initial program 88.9%
associate-/l*93.5%
Simplified93.5%
Taylor expanded in a around inf 46.2%
if -1.8500000000000001e-58 < z < -1.09999999999999991e-239 or 5.0000000000000003e-111 < z < 1.3e-28Initial program 93.8%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in y around inf 68.3%
div-sub71.6%
Simplified71.6%
Taylor expanded in a around inf 54.6%
Taylor expanded in t around inf 34.2%
associate-/l*45.4%
Simplified45.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.05e+72)
t
(if (<= z -2.9e-66)
x
(if (<= z -5.8e-239)
(* t (/ y a))
(if (<= z 4.2e-61) x (if (<= z 4e+45) (* t (/ y (- z))) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.05e+72) {
tmp = t;
} else if (z <= -2.9e-66) {
tmp = x;
} else if (z <= -5.8e-239) {
tmp = t * (y / a);
} else if (z <= 4.2e-61) {
tmp = x;
} else if (z <= 4e+45) {
tmp = t * (y / -z);
} 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.05d+72)) then
tmp = t
else if (z <= (-2.9d-66)) then
tmp = x
else if (z <= (-5.8d-239)) then
tmp = t * (y / a)
else if (z <= 4.2d-61) then
tmp = x
else if (z <= 4d+45) then
tmp = t * (y / -z)
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.05e+72) {
tmp = t;
} else if (z <= -2.9e-66) {
tmp = x;
} else if (z <= -5.8e-239) {
tmp = t * (y / a);
} else if (z <= 4.2e-61) {
tmp = x;
} else if (z <= 4e+45) {
tmp = t * (y / -z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.05e+72: tmp = t elif z <= -2.9e-66: tmp = x elif z <= -5.8e-239: tmp = t * (y / a) elif z <= 4.2e-61: tmp = x elif z <= 4e+45: tmp = t * (y / -z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.05e+72) tmp = t; elseif (z <= -2.9e-66) tmp = x; elseif (z <= -5.8e-239) tmp = Float64(t * Float64(y / a)); elseif (z <= 4.2e-61) tmp = x; elseif (z <= 4e+45) tmp = Float64(t * Float64(y / Float64(-z))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.05e+72) tmp = t; elseif (z <= -2.9e-66) tmp = x; elseif (z <= -5.8e-239) tmp = t * (y / a); elseif (z <= 4.2e-61) tmp = x; elseif (z <= 4e+45) tmp = t * (y / -z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.05e+72], t, If[LessEqual[z, -2.9e-66], x, If[LessEqual[z, -5.8e-239], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-61], x, If[LessEqual[z, 4e+45], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-66}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{-239}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-61}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+45}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.0500000000000001e72 or 3.9999999999999997e45 < z Initial program 36.6%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in z around inf 46.7%
if -1.0500000000000001e72 < z < -2.90000000000000011e-66 or -5.8000000000000004e-239 < z < 4.1999999999999998e-61Initial program 88.7%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in a around inf 42.7%
if -2.90000000000000011e-66 < z < -5.8000000000000004e-239Initial program 93.3%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in y around inf 68.0%
div-sub72.7%
Simplified72.7%
Taylor expanded in a around inf 58.3%
Taylor expanded in t around inf 35.5%
associate-/l*46.6%
Simplified46.6%
if 4.1999999999999998e-61 < z < 3.9999999999999997e45Initial program 86.6%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in x around 0 61.8%
associate-/l*71.0%
Simplified71.0%
Taylor expanded in a around 0 62.4%
associate-*r/62.4%
neg-mul-162.4%
Simplified62.4%
Taylor expanded in y around inf 45.0%
mul-1-neg45.0%
associate-/l*49.5%
distribute-lft-neg-in49.5%
Simplified49.5%
Final simplification45.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (* y (/ (- t x) (- a z)))))
(if (<= y -6.7e+37)
t_2
(if (<= y -4.7e-83)
t_1
(if (<= y -3.5e-217)
(* x (+ (/ z (- a z)) 1.0))
(if (<= y 155000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = y * ((t - x) / (a - z));
double tmp;
if (y <= -6.7e+37) {
tmp = t_2;
} else if (y <= -4.7e-83) {
tmp = t_1;
} else if (y <= -3.5e-217) {
tmp = x * ((z / (a - z)) + 1.0);
} else if (y <= 155000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = y * ((t - x) / (a - z))
if (y <= (-6.7d+37)) then
tmp = t_2
else if (y <= (-4.7d-83)) then
tmp = t_1
else if (y <= (-3.5d-217)) then
tmp = x * ((z / (a - z)) + 1.0d0)
else if (y <= 155000.0d0) then
tmp = t_1
else
tmp = t_2
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 t_2 = y * ((t - x) / (a - z));
double tmp;
if (y <= -6.7e+37) {
tmp = t_2;
} else if (y <= -4.7e-83) {
tmp = t_1;
} else if (y <= -3.5e-217) {
tmp = x * ((z / (a - z)) + 1.0);
} else if (y <= 155000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = y * ((t - x) / (a - z)) tmp = 0 if y <= -6.7e+37: tmp = t_2 elif y <= -4.7e-83: tmp = t_1 elif y <= -3.5e-217: tmp = x * ((z / (a - z)) + 1.0) elif y <= 155000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(y * Float64(Float64(t - x) / Float64(a - z))) tmp = 0.0 if (y <= -6.7e+37) tmp = t_2; elseif (y <= -4.7e-83) tmp = t_1; elseif (y <= -3.5e-217) tmp = Float64(x * Float64(Float64(z / Float64(a - z)) + 1.0)); elseif (y <= 155000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = y * ((t - x) / (a - z)); tmp = 0.0; if (y <= -6.7e+37) tmp = t_2; elseif (y <= -4.7e-83) tmp = t_1; elseif (y <= -3.5e-217) tmp = x * ((z / (a - z)) + 1.0); elseif (y <= 155000.0) tmp = t_1; else tmp = t_2; 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]}, Block[{t$95$2 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.7e+37], t$95$2, If[LessEqual[y, -4.7e-83], t$95$1, If[LessEqual[y, -3.5e-217], N[(x * N[(N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 155000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := y \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;y \leq -6.7 \cdot 10^{+37}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.7 \cdot 10^{-83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-217}:\\
\;\;\;\;x \cdot \left(\frac{z}{a - z} + 1\right)\\
\mathbf{elif}\;y \leq 155000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -6.69999999999999968e37 or 155000 < y Initial program 69.0%
associate-/l*86.6%
Simplified86.6%
Taylor expanded in y around inf 75.9%
div-sub77.5%
Simplified77.5%
if -6.69999999999999968e37 < y < -4.7000000000000003e-83 or -3.5e-217 < y < 155000Initial program 62.2%
associate-/l*72.2%
Simplified72.2%
Taylor expanded in x around 0 42.9%
associate-/l*57.1%
Simplified57.1%
if -4.7000000000000003e-83 < y < -3.5e-217Initial program 76.7%
associate-/l*77.2%
Simplified77.2%
Taylor expanded in x around -inf 57.3%
mul-1-neg57.3%
*-commutative57.3%
distribute-rgt-neg-in57.3%
Simplified57.3%
Taylor expanded in y around 0 56.9%
Final simplification67.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= t -6.2e-22)
t_2
(if (<= t -4.5e-169)
t_1
(if (<= t -2.4e-211)
(+ t (* x (/ y z)))
(if (<= t 3.4e-80) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (t <= -6.2e-22) {
tmp = t_2;
} else if (t <= -4.5e-169) {
tmp = t_1;
} else if (t <= -2.4e-211) {
tmp = t + (x * (y / z));
} else if (t <= 3.4e-80) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
t_2 = t * ((y - z) / (a - z))
if (t <= (-6.2d-22)) then
tmp = t_2
else if (t <= (-4.5d-169)) then
tmp = t_1
else if (t <= (-2.4d-211)) then
tmp = t + (x * (y / z))
else if (t <= 3.4d-80) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (t <= -6.2e-22) {
tmp = t_2;
} else if (t <= -4.5e-169) {
tmp = t_1;
} else if (t <= -2.4e-211) {
tmp = t + (x * (y / z));
} else if (t <= 3.4e-80) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) t_2 = t * ((y - z) / (a - z)) tmp = 0 if t <= -6.2e-22: tmp = t_2 elif t <= -4.5e-169: tmp = t_1 elif t <= -2.4e-211: tmp = t + (x * (y / z)) elif t <= 3.4e-80: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (t <= -6.2e-22) tmp = t_2; elseif (t <= -4.5e-169) tmp = t_1; elseif (t <= -2.4e-211) tmp = Float64(t + Float64(x * Float64(y / z))); elseif (t <= 3.4e-80) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); t_2 = t * ((y - z) / (a - z)); tmp = 0.0; if (t <= -6.2e-22) tmp = t_2; elseif (t <= -4.5e-169) tmp = t_1; elseif (t <= -2.4e-211) tmp = t + (x * (y / z)); elseif (t <= 3.4e-80) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e-22], t$95$2, If[LessEqual[t, -4.5e-169], t$95$1, If[LessEqual[t, -2.4e-211], N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-80], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{-22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-211}:\\
\;\;\;\;t + x \cdot \frac{y}{z}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -6.20000000000000025e-22 or 3.4000000000000001e-80 < t Initial program 62.5%
associate-/l*85.5%
Simplified85.5%
Taylor expanded in x around 0 51.0%
associate-/l*72.1%
Simplified72.1%
if -6.20000000000000025e-22 < t < -4.4999999999999999e-169 or -2.4000000000000002e-211 < t < 3.4000000000000001e-80Initial program 76.0%
associate-/l*74.1%
Simplified74.1%
Taylor expanded in x around -inf 68.5%
mul-1-neg68.5%
*-commutative68.5%
distribute-rgt-neg-in68.5%
Simplified68.5%
Taylor expanded in z around 0 55.1%
mul-1-neg55.1%
sub-neg55.1%
metadata-eval55.1%
Simplified55.1%
if -4.4999999999999999e-169 < t < -2.4000000000000002e-211Initial program 37.1%
associate-/l*46.7%
Simplified46.7%
Taylor expanded in z around inf 90.8%
associate--l+90.8%
associate-*r/90.8%
associate-*r/90.8%
mul-1-neg90.8%
div-sub90.8%
mul-1-neg90.8%
distribute-lft-out--90.8%
associate-*r/90.8%
mul-1-neg90.8%
unsub-neg90.8%
distribute-rgt-out--90.8%
Simplified90.8%
Taylor expanded in y around inf 86.2%
Taylor expanded in t around 0 86.2%
mul-1-neg86.2%
associate-/l*89.5%
distribute-rgt-neg-in89.5%
distribute-neg-frac289.5%
Simplified89.5%
Final simplification66.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- z y) z))) (t_2 (* x (- 1.0 (/ y a)))))
(if (<= a -2.9e+38)
t_2
(if (<= a -2.6e-172)
t_1
(if (<= a -5e-300) (+ t (* x (/ y z))) (if (<= a 2.95e-31) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / z);
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -2.9e+38) {
tmp = t_2;
} else if (a <= -2.6e-172) {
tmp = t_1;
} else if (a <= -5e-300) {
tmp = t + (x * (y / z));
} else if (a <= 2.95e-31) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((z - y) / z)
t_2 = x * (1.0d0 - (y / a))
if (a <= (-2.9d+38)) then
tmp = t_2
else if (a <= (-2.6d-172)) then
tmp = t_1
else if (a <= (-5d-300)) then
tmp = t + (x * (y / z))
else if (a <= 2.95d-31) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / z);
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -2.9e+38) {
tmp = t_2;
} else if (a <= -2.6e-172) {
tmp = t_1;
} else if (a <= -5e-300) {
tmp = t + (x * (y / z));
} else if (a <= 2.95e-31) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((z - y) / z) t_2 = x * (1.0 - (y / a)) tmp = 0 if a <= -2.9e+38: tmp = t_2 elif a <= -2.6e-172: tmp = t_1 elif a <= -5e-300: tmp = t + (x * (y / z)) elif a <= 2.95e-31: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(z - y) / z)) t_2 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (a <= -2.9e+38) tmp = t_2; elseif (a <= -2.6e-172) tmp = t_1; elseif (a <= -5e-300) tmp = Float64(t + Float64(x * Float64(y / z))); elseif (a <= 2.95e-31) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((z - y) / z); t_2 = x * (1.0 - (y / a)); tmp = 0.0; if (a <= -2.9e+38) tmp = t_2; elseif (a <= -2.6e-172) tmp = t_1; elseif (a <= -5e-300) tmp = t + (x * (y / z)); elseif (a <= 2.95e-31) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.9e+38], t$95$2, If[LessEqual[a, -2.6e-172], t$95$1, If[LessEqual[a, -5e-300], N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.95e-31], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z - y}{z}\\
t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;a \leq -2.9 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2.6 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -5 \cdot 10^{-300}:\\
\;\;\;\;t + x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 2.95 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.90000000000000007e38 or 2.95000000000000016e-31 < a Initial program 64.0%
associate-/l*86.9%
Simplified86.9%
Taylor expanded in x around -inf 58.7%
mul-1-neg58.7%
*-commutative58.7%
distribute-rgt-neg-in58.7%
Simplified58.7%
Taylor expanded in z around 0 50.3%
mul-1-neg50.3%
sub-neg50.3%
metadata-eval50.3%
Simplified50.3%
if -2.90000000000000007e38 < a < -2.5999999999999998e-172 or -4.99999999999999996e-300 < a < 2.95000000000000016e-31Initial program 68.1%
associate-/l*74.2%
Simplified74.2%
Taylor expanded in x around 0 60.9%
associate-/l*74.6%
Simplified74.6%
Taylor expanded in a around 0 66.8%
associate-*r/66.8%
neg-mul-166.8%
Simplified66.8%
Taylor expanded in t around 0 53.2%
associate-/l*66.8%
Simplified66.8%
if -2.5999999999999998e-172 < a < -4.99999999999999996e-300Initial program 74.4%
associate-/l*71.2%
Simplified71.2%
Taylor expanded in z around inf 89.5%
associate--l+89.5%
associate-*r/89.5%
associate-*r/89.5%
mul-1-neg89.5%
div-sub89.5%
mul-1-neg89.5%
distribute-lft-out--89.5%
associate-*r/89.5%
mul-1-neg89.5%
unsub-neg89.5%
distribute-rgt-out--89.5%
Simplified89.5%
Taylor expanded in y around inf 89.5%
Taylor expanded in t around 0 67.7%
mul-1-neg67.7%
associate-/l*70.3%
distribute-rgt-neg-in70.3%
distribute-neg-frac270.3%
Simplified70.3%
Final simplification59.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- z y) z))) (t_2 (* x (- 1.0 (/ y a)))))
(if (<= a -4.7e+38)
t_2
(if (<= a -1.4e-176)
t_1
(if (<= a -6.5e-299)
(* y (/ (- x t) z))
(if (<= a 1.25e-31) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / z);
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -4.7e+38) {
tmp = t_2;
} else if (a <= -1.4e-176) {
tmp = t_1;
} else if (a <= -6.5e-299) {
tmp = y * ((x - t) / z);
} else if (a <= 1.25e-31) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((z - y) / z)
t_2 = x * (1.0d0 - (y / a))
if (a <= (-4.7d+38)) then
tmp = t_2
else if (a <= (-1.4d-176)) then
tmp = t_1
else if (a <= (-6.5d-299)) then
tmp = y * ((x - t) / z)
else if (a <= 1.25d-31) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / z);
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -4.7e+38) {
tmp = t_2;
} else if (a <= -1.4e-176) {
tmp = t_1;
} else if (a <= -6.5e-299) {
tmp = y * ((x - t) / z);
} else if (a <= 1.25e-31) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((z - y) / z) t_2 = x * (1.0 - (y / a)) tmp = 0 if a <= -4.7e+38: tmp = t_2 elif a <= -1.4e-176: tmp = t_1 elif a <= -6.5e-299: tmp = y * ((x - t) / z) elif a <= 1.25e-31: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(z - y) / z)) t_2 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (a <= -4.7e+38) tmp = t_2; elseif (a <= -1.4e-176) tmp = t_1; elseif (a <= -6.5e-299) tmp = Float64(y * Float64(Float64(x - t) / z)); elseif (a <= 1.25e-31) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((z - y) / z); t_2 = x * (1.0 - (y / a)); tmp = 0.0; if (a <= -4.7e+38) tmp = t_2; elseif (a <= -1.4e-176) tmp = t_1; elseif (a <= -6.5e-299) tmp = y * ((x - t) / z); elseif (a <= 1.25e-31) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.7e+38], t$95$2, If[LessEqual[a, -1.4e-176], t$95$1, If[LessEqual[a, -6.5e-299], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-31], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z - y}{z}\\
t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;a \leq -4.7 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.4 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{-299}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -4.6999999999999999e38 or 1.25e-31 < a Initial program 64.0%
associate-/l*86.9%
Simplified86.9%
Taylor expanded in x around -inf 58.7%
mul-1-neg58.7%
*-commutative58.7%
distribute-rgt-neg-in58.7%
Simplified58.7%
Taylor expanded in z around 0 50.3%
mul-1-neg50.3%
sub-neg50.3%
metadata-eval50.3%
Simplified50.3%
if -4.6999999999999999e38 < a < -1.4000000000000001e-176 or -6.4999999999999997e-299 < a < 1.25e-31Initial program 68.0%
associate-/l*74.1%
Simplified74.1%
Taylor expanded in x around 0 61.2%
associate-/l*74.8%
Simplified74.8%
Taylor expanded in a around 0 67.1%
associate-*r/67.1%
neg-mul-167.1%
Simplified67.1%
Taylor expanded in t around 0 53.6%
associate-/l*67.1%
Simplified67.1%
if -1.4000000000000001e-176 < a < -6.4999999999999997e-299Initial program 75.0%
associate-/l*71.7%
Simplified71.7%
Taylor expanded in y around inf 61.4%
div-sub65.1%
Simplified65.1%
Taylor expanded in a around 0 61.2%
mul-1-neg61.2%
distribute-neg-frac261.2%
Simplified61.2%
Final simplification58.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- z y) z))) (t_2 (* x (- 1.0 (/ y a)))))
(if (<= a -4.5e+38)
t_2
(if (<= a -3.5e-178)
t_1
(if (<= a -3.2e-259) (* x (/ y z)) (if (<= a 1.05e-28) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / z);
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -4.5e+38) {
tmp = t_2;
} else if (a <= -3.5e-178) {
tmp = t_1;
} else if (a <= -3.2e-259) {
tmp = x * (y / z);
} else if (a <= 1.05e-28) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((z - y) / z)
t_2 = x * (1.0d0 - (y / a))
if (a <= (-4.5d+38)) then
tmp = t_2
else if (a <= (-3.5d-178)) then
tmp = t_1
else if (a <= (-3.2d-259)) then
tmp = x * (y / z)
else if (a <= 1.05d-28) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / z);
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -4.5e+38) {
tmp = t_2;
} else if (a <= -3.5e-178) {
tmp = t_1;
} else if (a <= -3.2e-259) {
tmp = x * (y / z);
} else if (a <= 1.05e-28) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((z - y) / z) t_2 = x * (1.0 - (y / a)) tmp = 0 if a <= -4.5e+38: tmp = t_2 elif a <= -3.5e-178: tmp = t_1 elif a <= -3.2e-259: tmp = x * (y / z) elif a <= 1.05e-28: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(z - y) / z)) t_2 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (a <= -4.5e+38) tmp = t_2; elseif (a <= -3.5e-178) tmp = t_1; elseif (a <= -3.2e-259) tmp = Float64(x * Float64(y / z)); elseif (a <= 1.05e-28) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((z - y) / z); t_2 = x * (1.0 - (y / a)); tmp = 0.0; if (a <= -4.5e+38) tmp = t_2; elseif (a <= -3.5e-178) tmp = t_1; elseif (a <= -3.2e-259) tmp = x * (y / z); elseif (a <= 1.05e-28) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.5e+38], t$95$2, If[LessEqual[a, -3.5e-178], t$95$1, If[LessEqual[a, -3.2e-259], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.05e-28], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z - y}{z}\\
t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;a \leq -4.5 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -3.5 \cdot 10^{-178}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.2 \cdot 10^{-259}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -4.4999999999999998e38 or 1.05000000000000003e-28 < a Initial program 64.0%
associate-/l*86.9%
Simplified86.9%
Taylor expanded in x around -inf 58.7%
mul-1-neg58.7%
*-commutative58.7%
distribute-rgt-neg-in58.7%
Simplified58.7%
Taylor expanded in z around 0 50.3%
mul-1-neg50.3%
sub-neg50.3%
metadata-eval50.3%
Simplified50.3%
if -4.4999999999999998e38 < a < -3.49999999999999983e-178 or -3.19999999999999988e-259 < a < 1.05000000000000003e-28Initial program 68.2%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in x around 0 59.4%
associate-/l*72.2%
Simplified72.2%
Taylor expanded in a around 0 65.3%
associate-*r/65.3%
neg-mul-165.3%
Simplified65.3%
Taylor expanded in t around 0 52.5%
associate-/l*65.3%
Simplified65.3%
if -3.49999999999999983e-178 < a < -3.19999999999999988e-259Initial program 79.3%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in z around inf 79.0%
associate--l+79.0%
associate-*r/79.0%
associate-*r/79.0%
mul-1-neg79.0%
div-sub79.0%
mul-1-neg79.0%
distribute-lft-out--79.0%
associate-*r/79.0%
mul-1-neg79.0%
unsub-neg79.0%
distribute-rgt-out--79.0%
Simplified79.0%
Taylor expanded in t around 0 58.1%
associate-/l*64.9%
Simplified64.9%
Taylor expanded in y around inf 58.1%
associate-/l*64.9%
Simplified64.9%
Final simplification58.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- z y) z))))
(if (<= a -4.2e+38)
x
(if (<= a -3.5e-178)
t_1
(if (<= a -3.7e-259) (* x (/ y z)) (if (<= a 3.9e+80) t_1 x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / z);
double tmp;
if (a <= -4.2e+38) {
tmp = x;
} else if (a <= -3.5e-178) {
tmp = t_1;
} else if (a <= -3.7e-259) {
tmp = x * (y / z);
} else if (a <= 3.9e+80) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * ((z - y) / z)
if (a <= (-4.2d+38)) then
tmp = x
else if (a <= (-3.5d-178)) then
tmp = t_1
else if (a <= (-3.7d-259)) then
tmp = x * (y / z)
else if (a <= 3.9d+80) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / z);
double tmp;
if (a <= -4.2e+38) {
tmp = x;
} else if (a <= -3.5e-178) {
tmp = t_1;
} else if (a <= -3.7e-259) {
tmp = x * (y / z);
} else if (a <= 3.9e+80) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((z - y) / z) tmp = 0 if a <= -4.2e+38: tmp = x elif a <= -3.5e-178: tmp = t_1 elif a <= -3.7e-259: tmp = x * (y / z) elif a <= 3.9e+80: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(z - y) / z)) tmp = 0.0 if (a <= -4.2e+38) tmp = x; elseif (a <= -3.5e-178) tmp = t_1; elseif (a <= -3.7e-259) tmp = Float64(x * Float64(y / z)); elseif (a <= 3.9e+80) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((z - y) / z); tmp = 0.0; if (a <= -4.2e+38) tmp = x; elseif (a <= -3.5e-178) tmp = t_1; elseif (a <= -3.7e-259) tmp = x * (y / z); elseif (a <= 3.9e+80) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.2e+38], x, If[LessEqual[a, -3.5e-178], t$95$1, If[LessEqual[a, -3.7e-259], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.9e+80], t$95$1, x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z - y}{z}\\
\mathbf{if}\;a \leq -4.2 \cdot 10^{+38}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -3.5 \cdot 10^{-178}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.7 \cdot 10^{-259}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.2e38 or 3.89999999999999999e80 < a Initial program 66.3%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in a around inf 48.9%
if -4.2e38 < a < -3.49999999999999983e-178 or -3.69999999999999991e-259 < a < 3.89999999999999999e80Initial program 66.1%
associate-/l*73.8%
Simplified73.8%
Taylor expanded in x around 0 53.6%
associate-/l*67.0%
Simplified67.0%
Taylor expanded in a around 0 59.0%
associate-*r/59.0%
neg-mul-159.0%
Simplified59.0%
Taylor expanded in t around 0 45.7%
associate-/l*59.0%
Simplified59.0%
if -3.49999999999999983e-178 < a < -3.69999999999999991e-259Initial program 79.3%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in z around inf 79.0%
associate--l+79.0%
associate-*r/79.0%
associate-*r/79.0%
mul-1-neg79.0%
div-sub79.0%
mul-1-neg79.0%
distribute-lft-out--79.0%
associate-*r/79.0%
mul-1-neg79.0%
unsub-neg79.0%
distribute-rgt-out--79.0%
Simplified79.0%
Taylor expanded in t around 0 58.1%
associate-/l*64.9%
Simplified64.9%
Taylor expanded in y around inf 58.1%
associate-/l*64.9%
Simplified64.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.2e+33) (not (<= a 4.2e-159))) (+ x (* (- y z) (/ (- t x) (- a z)))) (+ t (* y (/ (- x t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.2e+33) || !(a <= 4.2e-159)) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t + (y * ((x - t) / 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 ((a <= (-6.2d+33)) .or. (.not. (a <= 4.2d-159))) then
tmp = x + ((y - z) * ((t - x) / (a - z)))
else
tmp = t + (y * ((x - t) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.2e+33) || !(a <= 4.2e-159)) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t + (y * ((x - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6.2e+33) or not (a <= 4.2e-159): tmp = x + ((y - z) * ((t - x) / (a - z))) else: tmp = t + (y * ((x - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6.2e+33) || !(a <= 4.2e-159)) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); else tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6.2e+33) || ~((a <= 4.2e-159))) tmp = x + ((y - z) * ((t - x) / (a - z))); else tmp = t + (y * ((x - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.2e+33], N[Not[LessEqual[a, 4.2e-159]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.2 \cdot 10^{+33} \lor \neg \left(a \leq 4.2 \cdot 10^{-159}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if a < -6.2e33 or 4.1999999999999998e-159 < a Initial program 64.1%
associate-/l*86.5%
Simplified86.5%
if -6.2e33 < a < 4.1999999999999998e-159Initial program 70.9%
associate-/l*70.2%
Simplified70.2%
Taylor expanded in z around inf 85.5%
associate--l+85.5%
associate-*r/85.5%
associate-*r/85.5%
mul-1-neg85.5%
div-sub85.5%
mul-1-neg85.5%
distribute-lft-out--85.5%
associate-*r/85.5%
mul-1-neg85.5%
unsub-neg85.5%
distribute-rgt-out--85.5%
Simplified85.5%
Taylor expanded in y around inf 84.9%
associate-/l*87.6%
Simplified87.6%
Final simplification87.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -125.0) (not (<= z 2.5e+21))) (+ t (* y (/ (- x t) z))) (- x (* y (/ (- x t) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -125.0) || !(z <= 2.5e+21)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x - (y * ((x - t) / 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 <= (-125.0d0)) .or. (.not. (z <= 2.5d+21))) then
tmp = t + (y * ((x - t) / z))
else
tmp = x - (y * ((x - t) / 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 <= -125.0) || !(z <= 2.5e+21)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x - (y * ((x - t) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -125.0) or not (z <= 2.5e+21): tmp = t + (y * ((x - t) / z)) else: tmp = x - (y * ((x - t) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -125.0) || !(z <= 2.5e+21)) tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); else tmp = Float64(x - Float64(y * Float64(Float64(x - t) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -125.0) || ~((z <= 2.5e+21))) tmp = t + (y * ((x - t) / z)); else tmp = x - (y * ((x - t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -125.0], N[Not[LessEqual[z, 2.5e+21]], $MachinePrecision]], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -125 \lor \neg \left(z \leq 2.5 \cdot 10^{+21}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{x - t}{a}\\
\end{array}
\end{array}
if z < -125 or 2.5e21 < z Initial program 43.9%
associate-/l*65.3%
Simplified65.3%
Taylor expanded in z around inf 65.9%
associate--l+65.9%
associate-*r/65.9%
associate-*r/65.9%
mul-1-neg65.9%
div-sub65.9%
mul-1-neg65.9%
distribute-lft-out--65.9%
associate-*r/65.9%
mul-1-neg65.9%
unsub-neg65.9%
distribute-rgt-out--66.8%
Simplified66.8%
Taylor expanded in y around inf 63.7%
associate-/l*74.5%
Simplified74.5%
if -125 < z < 2.5e21Initial program 93.0%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in z around 0 71.7%
associate-/l*77.7%
Simplified77.7%
Final simplification76.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -140.0) (+ t (* x (/ y z))) (if (<= z 2.8e+21) (- x (* y (/ (- x t) a))) (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -140.0) {
tmp = t + (x * (y / z));
} else if (z <= 2.8e+21) {
tmp = x - (y * ((x - t) / a));
} else {
tmp = t * ((y - z) / (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 <= (-140.0d0)) then
tmp = t + (x * (y / z))
else if (z <= 2.8d+21) then
tmp = x - (y * ((x - t) / a))
else
tmp = t * ((y - z) / (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 <= -140.0) {
tmp = t + (x * (y / z));
} else if (z <= 2.8e+21) {
tmp = x - (y * ((x - t) / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -140.0: tmp = t + (x * (y / z)) elif z <= 2.8e+21: tmp = x - (y * ((x - t) / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -140.0) tmp = Float64(t + Float64(x * Float64(y / z))); elseif (z <= 2.8e+21) tmp = Float64(x - Float64(y * Float64(Float64(x - t) / a))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -140.0) tmp = t + (x * (y / z)); elseif (z <= 2.8e+21) tmp = x - (y * ((x - t) / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -140.0], N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+21], N[(x - N[(y * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -140:\\
\;\;\;\;t + x \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+21}:\\
\;\;\;\;x - y \cdot \frac{x - t}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if z < -140Initial program 46.0%
associate-/l*62.9%
Simplified62.9%
Taylor expanded in z around inf 65.5%
associate--l+65.5%
associate-*r/65.5%
associate-*r/65.5%
mul-1-neg65.5%
div-sub65.5%
mul-1-neg65.5%
distribute-lft-out--65.5%
associate-*r/65.5%
mul-1-neg65.5%
unsub-neg65.5%
distribute-rgt-out--65.5%
Simplified65.5%
Taylor expanded in y around inf 63.2%
Taylor expanded in t around 0 54.9%
mul-1-neg54.9%
associate-/l*60.6%
distribute-rgt-neg-in60.6%
distribute-neg-frac260.6%
Simplified60.6%
if -140 < z < 2.8e21Initial program 93.0%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in z around 0 71.7%
associate-/l*77.7%
Simplified77.7%
if 2.8e21 < z Initial program 41.0%
associate-/l*68.6%
Simplified68.6%
Taylor expanded in x around 0 47.1%
associate-/l*71.5%
Simplified71.5%
Final simplification71.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.35e+72) t (if (<= z 3.6e+14) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e+72) {
tmp = t;
} else if (z <= 3.6e+14) {
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.35d+72)) then
tmp = t
else if (z <= 3.6d+14) 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.35e+72) {
tmp = t;
} else if (z <= 3.6e+14) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.35e+72: tmp = t elif z <= 3.6e+14: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.35e+72) tmp = t; elseif (z <= 3.6e+14) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.35e+72) tmp = t; elseif (z <= 3.6e+14) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e+72], t, If[LessEqual[z, 3.6e+14], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.35e72 or 3.6e14 < z Initial program 39.5%
associate-/l*64.0%
Simplified64.0%
Taylor expanded in z around inf 45.3%
if -1.35e72 < z < 3.6e14Initial program 91.0%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in a around inf 34.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 66.9%
associate-/l*79.7%
Simplified79.7%
Taylor expanded in z around inf 24.7%
(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 2024096
(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))))