
(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 18 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 (fma (- y z) (/ (- t x) (- a z)) x))
(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 = fma((y - z), ((t - x) / (a - z)), x);
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;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(Float64(t - x) / Float64(a - z)), x) 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
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $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 := \mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\
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%
+-commutative61.4%
associate-/l*86.2%
fma-define86.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%
Taylor expanded in z around inf 95.6%
associate--l+95.6%
distribute-lft-out--95.6%
div-sub95.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.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* y (/ (- x t) z))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -1e-274)
t_2
(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 = t + (y * ((x - t) / z));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -1e-274) {
tmp = t_2;
} 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;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (y * ((x - t) / z));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -1e-274) {
tmp = t_2;
} 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 = t + (y * ((x - t) / z)) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -1e-274: tmp = t_2 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(t + Float64(y * Float64(Float64(x - t) / z))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -1e-274) tmp = t_2; 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 = t + (y * ((x - t) / z)); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -1e-274) tmp = t_2; 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[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $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, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-274], t$95$2, 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 := t + y \cdot \frac{x - t}{z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-274}:\\
\;\;\;\;t\_2\\
\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))) < -inf.0 or 4.9999999999999997e304 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 41.1%
Taylor expanded in z around inf 53.4%
associate--l+53.4%
distribute-lft-out--53.4%
div-sub54.4%
mul-1-neg54.4%
unsub-neg54.4%
distribute-rgt-out--55.6%
Simplified55.6%
Taylor expanded in y around inf 55.7%
associate-/l*71.3%
Simplified71.3%
if -inf.0 < (+.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))) < 4.9999999999999997e304Initial program 98.1%
if -9.99999999999999966e-275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1e-282Initial program 5.7%
Taylor expanded in z around inf 99.4%
associate--l+99.4%
distribute-lft-out--99.4%
div-sub99.3%
mul-1-neg99.3%
unsub-neg99.3%
distribute-rgt-out--99.4%
Simplified99.4%
Final simplification87.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
(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) / ((a - z) / (t - x)));
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) / ((a - z) / (t - x)))
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) / ((a - z) / (t - x)));
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) / ((a - z) / (t - x))) 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(a - z) / Float64(t - x)))) 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) / ((a - z) / (t - x))); 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[(a - z), $MachinePrecision] / N[(t - x), $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 + \frac{y - z}{\frac{a - z}{t - x}}\\
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%
clear-num86.1%
un-div-inv86.0%
Applied egg-rr86.0%
if -4.99999999999999977e-163 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1e-282Initial program 19.5%
Taylor expanded in z around inf 95.6%
associate--l+95.6%
distribute-lft-out--95.6%
div-sub95.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 simplification89.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* t (/ (- y z) a)))))
(if (<= a -4.7e+38)
t_2
(if (<= a -9.5e-217)
t_1
(if (<= a -1.7e-295)
(/ (* y (- x t)) z)
(if (<= a 6.4e-32)
t_1
(if (<= a 7e+88) (* y (/ (- t x) (- a z))) 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 = x + (t * ((y - z) / a));
double tmp;
if (a <= -4.7e+38) {
tmp = t_2;
} else if (a <= -9.5e-217) {
tmp = t_1;
} else if (a <= -1.7e-295) {
tmp = (y * (x - t)) / z;
} else if (a <= 6.4e-32) {
tmp = t_1;
} else if (a <= 7e+88) {
tmp = y * ((t - x) / (a - z));
} 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 = x + (t * ((y - z) / a))
if (a <= (-4.7d+38)) then
tmp = t_2
else if (a <= (-9.5d-217)) then
tmp = t_1
else if (a <= (-1.7d-295)) then
tmp = (y * (x - t)) / z
else if (a <= 6.4d-32) then
tmp = t_1
else if (a <= 7d+88) then
tmp = y * ((t - x) / (a - z))
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 = x + (t * ((y - z) / a));
double tmp;
if (a <= -4.7e+38) {
tmp = t_2;
} else if (a <= -9.5e-217) {
tmp = t_1;
} else if (a <= -1.7e-295) {
tmp = (y * (x - t)) / z;
} else if (a <= 6.4e-32) {
tmp = t_1;
} else if (a <= 7e+88) {
tmp = y * ((t - x) / (a - z));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x + (t * ((y - z) / a)) tmp = 0 if a <= -4.7e+38: tmp = t_2 elif a <= -9.5e-217: tmp = t_1 elif a <= -1.7e-295: tmp = (y * (x - t)) / z elif a <= 6.4e-32: tmp = t_1 elif a <= 7e+88: tmp = y * ((t - x) / (a - z)) 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(x + Float64(t * Float64(Float64(y - z) / a))) tmp = 0.0 if (a <= -4.7e+38) tmp = t_2; elseif (a <= -9.5e-217) tmp = t_1; elseif (a <= -1.7e-295) tmp = Float64(Float64(y * Float64(x - t)) / z); elseif (a <= 6.4e-32) tmp = t_1; elseif (a <= 7e+88) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); 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 = x + (t * ((y - z) / a)); tmp = 0.0; if (a <= -4.7e+38) tmp = t_2; elseif (a <= -9.5e-217) tmp = t_1; elseif (a <= -1.7e-295) tmp = (y * (x - t)) / z; elseif (a <= 6.4e-32) tmp = t_1; elseif (a <= 7e+88) tmp = y * ((t - x) / (a - z)); 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[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.7e+38], t$95$2, If[LessEqual[a, -9.5e-217], t$95$1, If[LessEqual[a, -1.7e-295], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 6.4e-32], t$95$1, If[LessEqual[a, 7e+88], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x + t \cdot \frac{y - z}{a}\\
\mathbf{if}\;a \leq -4.7 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -9.5 \cdot 10^{-217}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-295}:\\
\;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;a \leq 6.4 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7 \cdot 10^{+88}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -4.6999999999999999e38 or 6.9999999999999995e88 < a Initial program 66.2%
Taylor expanded in t around inf 63.8%
associate-/l*82.4%
Simplified82.4%
Taylor expanded in a around inf 61.3%
associate-/l*72.7%
Simplified72.7%
if -4.6999999999999999e38 < a < -9.5000000000000001e-217 or -1.70000000000000004e-295 < a < 6.4000000000000004e-32Initial program 68.3%
associate-/l*75.0%
clear-num74.9%
un-div-inv74.9%
Applied egg-rr74.9%
Taylor expanded in x around 0 60.9%
associate-*r/74.8%
Simplified74.8%
if -9.5000000000000001e-217 < a < -1.70000000000000004e-295Initial program 74.7%
Taylor expanded in a around 0 70.5%
mul-1-neg70.5%
unsub-neg70.5%
associate-/l*66.5%
Simplified66.5%
Taylor expanded in y around -inf 70.2%
associate-*r/70.2%
associate-*r*70.2%
mul-1-neg70.2%
Simplified70.2%
if 6.4000000000000004e-32 < a < 6.9999999999999995e88Initial program 56.5%
associate-/l*77.3%
clear-num77.1%
un-div-inv77.0%
Applied egg-rr77.0%
Taylor expanded in y around inf 57.4%
div-sub57.4%
Simplified57.4%
Final simplification71.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* t (/ y a)))))
(if (<= a -2.8e+38)
t_2
(if (<= a -1.8e-215)
t_1
(if (<= a -1.38e-297)
(/ (* y (- x t)) z)
(if (<= a 3.8e-31)
t_1
(if (<= a 2.9e+87) (* y (/ (- t x) (- a z))) 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 = x + (t * (y / a));
double tmp;
if (a <= -2.8e+38) {
tmp = t_2;
} else if (a <= -1.8e-215) {
tmp = t_1;
} else if (a <= -1.38e-297) {
tmp = (y * (x - t)) / z;
} else if (a <= 3.8e-31) {
tmp = t_1;
} else if (a <= 2.9e+87) {
tmp = y * ((t - x) / (a - z));
} 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 = x + (t * (y / a))
if (a <= (-2.8d+38)) then
tmp = t_2
else if (a <= (-1.8d-215)) then
tmp = t_1
else if (a <= (-1.38d-297)) then
tmp = (y * (x - t)) / z
else if (a <= 3.8d-31) then
tmp = t_1
else if (a <= 2.9d+87) then
tmp = y * ((t - x) / (a - z))
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 = x + (t * (y / a));
double tmp;
if (a <= -2.8e+38) {
tmp = t_2;
} else if (a <= -1.8e-215) {
tmp = t_1;
} else if (a <= -1.38e-297) {
tmp = (y * (x - t)) / z;
} else if (a <= 3.8e-31) {
tmp = t_1;
} else if (a <= 2.9e+87) {
tmp = y * ((t - x) / (a - z));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x + (t * (y / a)) tmp = 0 if a <= -2.8e+38: tmp = t_2 elif a <= -1.8e-215: tmp = t_1 elif a <= -1.38e-297: tmp = (y * (x - t)) / z elif a <= 3.8e-31: tmp = t_1 elif a <= 2.9e+87: tmp = y * ((t - x) / (a - z)) 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(x + Float64(t * Float64(y / a))) tmp = 0.0 if (a <= -2.8e+38) tmp = t_2; elseif (a <= -1.8e-215) tmp = t_1; elseif (a <= -1.38e-297) tmp = Float64(Float64(y * Float64(x - t)) / z); elseif (a <= 3.8e-31) tmp = t_1; elseif (a <= 2.9e+87) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); 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 = x + (t * (y / a)); tmp = 0.0; if (a <= -2.8e+38) tmp = t_2; elseif (a <= -1.8e-215) tmp = t_1; elseif (a <= -1.38e-297) tmp = (y * (x - t)) / z; elseif (a <= 3.8e-31) tmp = t_1; elseif (a <= 2.9e+87) tmp = y * ((t - x) / (a - z)); 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[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.8e+38], t$95$2, If[LessEqual[a, -1.8e-215], t$95$1, If[LessEqual[a, -1.38e-297], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 3.8e-31], t$95$1, If[LessEqual[a, 2.9e+87], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -2.8 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-215}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.38 \cdot 10^{-297}:\\
\;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+87}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.8e38 or 2.8999999999999998e87 < a Initial program 66.2%
Taylor expanded in t around inf 63.8%
associate-/l*82.4%
Simplified82.4%
Taylor expanded in z around 0 65.3%
if -2.8e38 < a < -1.7999999999999999e-215 or -1.38000000000000004e-297 < a < 3.8e-31Initial program 68.3%
associate-/l*75.0%
clear-num74.9%
un-div-inv74.9%
Applied egg-rr74.9%
Taylor expanded in x around 0 60.9%
associate-*r/74.8%
Simplified74.8%
if -1.7999999999999999e-215 < a < -1.38000000000000004e-297Initial program 74.7%
Taylor expanded in a around 0 70.5%
mul-1-neg70.5%
unsub-neg70.5%
associate-/l*66.5%
Simplified66.5%
Taylor expanded in y around -inf 70.2%
associate-*r/70.2%
associate-*r*70.2%
mul-1-neg70.2%
Simplified70.2%
if 3.8e-31 < a < 2.8999999999999998e87Initial program 56.5%
associate-/l*77.3%
clear-num77.1%
un-div-inv77.0%
Applied egg-rr77.0%
Taylor expanded in y around inf 57.4%
div-sub57.4%
Simplified57.4%
Final simplification69.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= z -2.9e+72)
t
(if (<= z -1.75e-56)
x
(if (<= z -1.25e-237)
t_1
(if (<= z 4.2e-113)
x
(if (<= z 1e-28) t_1 (if (<= z 2.55e+79) (+ x t) t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (z <= -2.9e+72) {
tmp = t;
} else if (z <= -1.75e-56) {
tmp = x;
} else if (z <= -1.25e-237) {
tmp = t_1;
} else if (z <= 4.2e-113) {
tmp = x;
} else if (z <= 1e-28) {
tmp = t_1;
} else if (z <= 2.55e+79) {
tmp = x + t;
} 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.9d+72)) then
tmp = t
else if (z <= (-1.75d-56)) then
tmp = x
else if (z <= (-1.25d-237)) then
tmp = t_1
else if (z <= 4.2d-113) then
tmp = x
else if (z <= 1d-28) then
tmp = t_1
else if (z <= 2.55d+79) then
tmp = x + t
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.9e+72) {
tmp = t;
} else if (z <= -1.75e-56) {
tmp = x;
} else if (z <= -1.25e-237) {
tmp = t_1;
} else if (z <= 4.2e-113) {
tmp = x;
} else if (z <= 1e-28) {
tmp = t_1;
} else if (z <= 2.55e+79) {
tmp = x + t;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if z <= -2.9e+72: tmp = t elif z <= -1.75e-56: tmp = x elif z <= -1.25e-237: tmp = t_1 elif z <= 4.2e-113: tmp = x elif z <= 1e-28: tmp = t_1 elif z <= 2.55e+79: tmp = x + t 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.9e+72) tmp = t; elseif (z <= -1.75e-56) tmp = x; elseif (z <= -1.25e-237) tmp = t_1; elseif (z <= 4.2e-113) tmp = x; elseif (z <= 1e-28) tmp = t_1; elseif (z <= 2.55e+79) tmp = Float64(x + t); 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.9e+72) tmp = t; elseif (z <= -1.75e-56) tmp = x; elseif (z <= -1.25e-237) tmp = t_1; elseif (z <= 4.2e-113) tmp = x; elseif (z <= 1e-28) tmp = t_1; elseif (z <= 2.55e+79) tmp = x + t; 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.9e+72], t, If[LessEqual[z, -1.75e-56], x, If[LessEqual[z, -1.25e-237], t$95$1, If[LessEqual[z, 4.2e-113], x, If[LessEqual[z, 1e-28], t$95$1, If[LessEqual[z, 2.55e+79], N[(x + t), $MachinePrecision], t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-56}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-237}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{+79}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.90000000000000017e72 or 2.5500000000000001e79 < z Initial program 36.5%
Taylor expanded in z around inf 47.0%
if -2.90000000000000017e72 < z < -1.7499999999999999e-56 or -1.2500000000000001e-237 < z < 4.2e-113Initial program 88.1%
Taylor expanded in a around inf 45.2%
if -1.7499999999999999e-56 < z < -1.2500000000000001e-237 or 4.2e-113 < z < 9.99999999999999971e-29Initial program 93.8%
associate-/l*93.6%
clear-num92.2%
un-div-inv92.1%
Applied egg-rr92.1%
Taylor expanded in y around inf 68.3%
div-sub71.6%
Simplified71.6%
Taylor expanded in t around inf 43.9%
Taylor expanded in a around inf 34.2%
associate-/l*45.4%
Simplified45.4%
if 9.99999999999999971e-29 < z < 2.5500000000000001e79Initial program 74.3%
Taylor expanded in t around inf 71.6%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in z around inf 39.8%
Final simplification45.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.6e+70)
(* t (/ (- z y) z))
(if (<= z -7000000.0)
(* y (/ (- x t) z))
(if (<= z -140.0)
t
(if (<= z 58000000000000.0)
(+ x (* t (/ y a)))
(* t (- 1.0 (/ y z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.6e+70) {
tmp = t * ((z - y) / z);
} else if (z <= -7000000.0) {
tmp = y * ((x - t) / z);
} else if (z <= -140.0) {
tmp = t;
} else if (z <= 58000000000000.0) {
tmp = x + (t * (y / a));
} else {
tmp = t * (1.0 - (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 <= (-8.6d+70)) then
tmp = t * ((z - y) / z)
else if (z <= (-7000000.0d0)) then
tmp = y * ((x - t) / z)
else if (z <= (-140.0d0)) then
tmp = t
else if (z <= 58000000000000.0d0) then
tmp = x + (t * (y / a))
else
tmp = t * (1.0d0 - (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 <= -8.6e+70) {
tmp = t * ((z - y) / z);
} else if (z <= -7000000.0) {
tmp = y * ((x - t) / z);
} else if (z <= -140.0) {
tmp = t;
} else if (z <= 58000000000000.0) {
tmp = x + (t * (y / a));
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.6e+70: tmp = t * ((z - y) / z) elif z <= -7000000.0: tmp = y * ((x - t) / z) elif z <= -140.0: tmp = t elif z <= 58000000000000.0: tmp = x + (t * (y / a)) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.6e+70) tmp = Float64(t * Float64(Float64(z - y) / z)); elseif (z <= -7000000.0) tmp = Float64(y * Float64(Float64(x - t) / z)); elseif (z <= -140.0) tmp = t; elseif (z <= 58000000000000.0) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.6e+70) tmp = t * ((z - y) / z); elseif (z <= -7000000.0) tmp = y * ((x - t) / z); elseif (z <= -140.0) tmp = t; elseif (z <= 58000000000000.0) tmp = x + (t * (y / a)); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.6e+70], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7000000.0], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -140.0], t, If[LessEqual[z, 58000000000000.0], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+70}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\
\mathbf{elif}\;z \leq -7000000:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{elif}\;z \leq -140:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 58000000000000:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -8.6000000000000002e70Initial program 38.7%
Taylor expanded in a around 0 28.1%
mul-1-neg28.1%
unsub-neg28.1%
associate-/l*46.2%
Simplified46.2%
Taylor expanded in t around inf 53.2%
Taylor expanded in z around 0 53.3%
if -8.6000000000000002e70 < z < -7e6Initial program 70.6%
associate-/l*75.5%
clear-num75.5%
un-div-inv75.5%
Applied egg-rr75.5%
Taylor expanded in y around inf 76.4%
div-sub76.4%
Simplified76.4%
Taylor expanded in a around 0 69.0%
mul-1-neg69.0%
distribute-neg-frac269.0%
Simplified69.0%
if -7e6 < z < -140Initial program 100.0%
Taylor expanded in z around inf 100.0%
if -140 < z < 5.8e13Initial program 93.7%
Taylor expanded in t around inf 71.1%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in z around 0 67.0%
if 5.8e13 < z Initial program 41.4%
Taylor expanded in a around 0 34.3%
mul-1-neg34.3%
unsub-neg34.3%
associate-/l*54.9%
Simplified54.9%
Taylor expanded in t around inf 62.9%
Final simplification63.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.7e+38)
x
(if (<= a -3.5e-178)
(* t (- 1.0 (/ y z)))
(if (<= a -3.7e-259)
(* x (/ y z))
(if (<= a 3.8e+82) (* t (/ (- z y) z)) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.7e+38) {
tmp = x;
} else if (a <= -3.5e-178) {
tmp = t * (1.0 - (y / z));
} else if (a <= -3.7e-259) {
tmp = x * (y / z);
} else if (a <= 3.8e+82) {
tmp = t * ((z - 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 <= (-4.7d+38)) then
tmp = x
else if (a <= (-3.5d-178)) then
tmp = t * (1.0d0 - (y / z))
else if (a <= (-3.7d-259)) then
tmp = x * (y / z)
else if (a <= 3.8d+82) then
tmp = t * ((z - 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 <= -4.7e+38) {
tmp = x;
} else if (a <= -3.5e-178) {
tmp = t * (1.0 - (y / z));
} else if (a <= -3.7e-259) {
tmp = x * (y / z);
} else if (a <= 3.8e+82) {
tmp = t * ((z - y) / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.7e+38: tmp = x elif a <= -3.5e-178: tmp = t * (1.0 - (y / z)) elif a <= -3.7e-259: tmp = x * (y / z) elif a <= 3.8e+82: tmp = t * ((z - y) / z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.7e+38) tmp = x; elseif (a <= -3.5e-178) tmp = Float64(t * Float64(1.0 - Float64(y / z))); elseif (a <= -3.7e-259) tmp = Float64(x * Float64(y / z)); elseif (a <= 3.8e+82) tmp = Float64(t * Float64(Float64(z - y) / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.7e+38) tmp = x; elseif (a <= -3.5e-178) tmp = t * (1.0 - (y / z)); elseif (a <= -3.7e-259) tmp = x * (y / z); elseif (a <= 3.8e+82) tmp = t * ((z - y) / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.7e+38], x, If[LessEqual[a, -3.5e-178], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.7e-259], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.8e+82], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.7 \cdot 10^{+38}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -3.5 \cdot 10^{-178}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;a \leq -3.7 \cdot 10^{-259}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{+82}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.6999999999999999e38 or 3.80000000000000033e82 < a Initial program 66.3%
Taylor expanded in a around inf 48.9%
if -4.6999999999999999e38 < a < -3.49999999999999983e-178Initial program 71.3%
Taylor expanded in a around 0 54.6%
mul-1-neg54.6%
unsub-neg54.6%
associate-/l*56.8%
Simplified56.8%
Taylor expanded in t around inf 67.9%
if -3.49999999999999983e-178 < a < -3.69999999999999991e-259Initial program 79.3%
Taylor expanded in a around 0 65.2%
mul-1-neg65.2%
unsub-neg65.2%
associate-/l*72.0%
Simplified72.0%
Taylor expanded in x around -inf 58.1%
associate-/l*64.9%
Simplified64.9%
if -3.69999999999999991e-259 < a < 3.80000000000000033e82Initial program 63.9%
Taylor expanded in a around 0 46.0%
mul-1-neg46.0%
unsub-neg46.0%
associate-/l*59.6%
Simplified59.6%
Taylor expanded in t around inf 55.2%
Taylor expanded in z around 0 55.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= a -4.4e+38)
x
(if (<= a -5e-178)
t_1
(if (<= a -3.2e-259) (* x (/ y z)) (if (<= a 1.3e+81) t_1 x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (a <= -4.4e+38) {
tmp = x;
} else if (a <= -5e-178) {
tmp = t_1;
} else if (a <= -3.2e-259) {
tmp = x * (y / z);
} else if (a <= 1.3e+81) {
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 * (1.0d0 - (y / z))
if (a <= (-4.4d+38)) then
tmp = x
else if (a <= (-5d-178)) then
tmp = t_1
else if (a <= (-3.2d-259)) then
tmp = x * (y / z)
else if (a <= 1.3d+81) 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 * (1.0 - (y / z));
double tmp;
if (a <= -4.4e+38) {
tmp = x;
} else if (a <= -5e-178) {
tmp = t_1;
} else if (a <= -3.2e-259) {
tmp = x * (y / z);
} else if (a <= 1.3e+81) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if a <= -4.4e+38: tmp = x elif a <= -5e-178: tmp = t_1 elif a <= -3.2e-259: tmp = x * (y / z) elif a <= 1.3e+81: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (a <= -4.4e+38) tmp = x; elseif (a <= -5e-178) tmp = t_1; elseif (a <= -3.2e-259) tmp = Float64(x * Float64(y / z)); elseif (a <= 1.3e+81) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (a <= -4.4e+38) tmp = x; elseif (a <= -5e-178) tmp = t_1; elseif (a <= -3.2e-259) tmp = x * (y / z); elseif (a <= 1.3e+81) tmp = t_1; else tmp = x; 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[a, -4.4e+38], x, If[LessEqual[a, -5e-178], t$95$1, If[LessEqual[a, -3.2e-259], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e+81], t$95$1, x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;a \leq -4.4 \cdot 10^{+38}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -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.3 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.40000000000000013e38 or 1.29999999999999996e81 < a Initial program 66.3%
Taylor expanded in a around inf 48.9%
if -4.40000000000000013e38 < a < -4.99999999999999976e-178 or -3.19999999999999988e-259 < a < 1.29999999999999996e81Initial program 66.1%
Taylor expanded in a around 0 48.6%
mul-1-neg48.6%
unsub-neg48.6%
associate-/l*58.7%
Simplified58.7%
Taylor expanded in t around inf 59.0%
if -4.99999999999999976e-178 < a < -3.19999999999999988e-259Initial program 79.3%
Taylor expanded in a around 0 65.2%
mul-1-neg65.2%
unsub-neg65.2%
associate-/l*72.0%
Simplified72.0%
Taylor expanded in x around -inf 58.1%
associate-/l*64.9%
Simplified64.9%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.2e+173)
(* t (/ (- y) z))
(if (<= y 9e+20)
(+ x t)
(if (or (<= y 3.8e+140) (not (<= y 4.25e+273)))
(* x (/ y z))
(* t (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.2e+173) {
tmp = t * (-y / z);
} else if (y <= 9e+20) {
tmp = x + t;
} else if ((y <= 3.8e+140) || !(y <= 4.25e+273)) {
tmp = x * (y / z);
} else {
tmp = 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 (y <= (-1.2d+173)) then
tmp = t * (-y / z)
else if (y <= 9d+20) then
tmp = x + t
else if ((y <= 3.8d+140) .or. (.not. (y <= 4.25d+273))) then
tmp = x * (y / z)
else
tmp = 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 (y <= -1.2e+173) {
tmp = t * (-y / z);
} else if (y <= 9e+20) {
tmp = x + t;
} else if ((y <= 3.8e+140) || !(y <= 4.25e+273)) {
tmp = x * (y / z);
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.2e+173: tmp = t * (-y / z) elif y <= 9e+20: tmp = x + t elif (y <= 3.8e+140) or not (y <= 4.25e+273): tmp = x * (y / z) else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.2e+173) tmp = Float64(t * Float64(Float64(-y) / z)); elseif (y <= 9e+20) tmp = Float64(x + t); elseif ((y <= 3.8e+140) || !(y <= 4.25e+273)) tmp = Float64(x * Float64(y / z)); else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.2e+173) tmp = t * (-y / z); elseif (y <= 9e+20) tmp = x + t; elseif ((y <= 3.8e+140) || ~((y <= 4.25e+273))) tmp = x * (y / z); else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.2e+173], N[(t * N[((-y) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+20], N[(x + t), $MachinePrecision], If[Or[LessEqual[y, 3.8e+140], N[Not[LessEqual[y, 4.25e+273]], $MachinePrecision]], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+173}:\\
\;\;\;\;t \cdot \frac{-y}{z}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+20}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+140} \lor \neg \left(y \leq 4.25 \cdot 10^{+273}\right):\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -1.2e173Initial program 74.9%
Taylor expanded in a around 0 64.6%
mul-1-neg64.6%
unsub-neg64.6%
associate-/l*76.3%
Simplified76.3%
Taylor expanded in t around inf 59.1%
Taylor expanded in y around inf 40.2%
mul-1-neg40.2%
associate-/l*46.6%
distribute-rgt-neg-in46.6%
distribute-frac-neg246.6%
Simplified46.6%
if -1.2e173 < y < 9e20Initial program 65.2%
Taylor expanded in t around inf 60.2%
associate-/l*72.0%
Simplified72.0%
Taylor expanded in z around inf 44.3%
if 9e20 < y < 3.8000000000000001e140 or 4.2500000000000001e273 < y Initial program 66.5%
Taylor expanded in a around 0 44.5%
mul-1-neg44.5%
unsub-neg44.5%
associate-/l*55.1%
Simplified55.1%
Taylor expanded in x around -inf 37.8%
associate-/l*46.1%
Simplified46.1%
if 3.8000000000000001e140 < y < 4.2500000000000001e273Initial program 67.8%
associate-/l*86.3%
clear-num86.3%
un-div-inv86.3%
Applied egg-rr86.3%
Taylor expanded in y around inf 83.6%
div-sub87.0%
Simplified87.0%
Taylor expanded in t around inf 53.9%
Taylor expanded in a around inf 32.9%
associate-/l*46.9%
Simplified46.9%
Final simplification45.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -6.4e+71)
t_1
(if (<= z -1.12e+24)
(* y (/ (- t x) (- a z)))
(if (<= z 2.9e+21) (+ x (* y (/ (- t x) a))) 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 <= -6.4e+71) {
tmp = t_1;
} else if (z <= -1.12e+24) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 2.9e+21) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
if (z <= (-6.4d+71)) then
tmp = t_1
else if (z <= (-1.12d+24)) then
tmp = y * ((t - x) / (a - z))
else if (z <= 2.9d+21) then
tmp = x + (y * ((t - x) / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -6.4e+71) {
tmp = t_1;
} else if (z <= -1.12e+24) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 2.9e+21) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -6.4e+71: tmp = t_1 elif z <= -1.12e+24: tmp = y * ((t - x) / (a - z)) elif z <= 2.9e+21: tmp = x + (y * ((t - x) / a)) 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 <= -6.4e+71) tmp = t_1; elseif (z <= -1.12e+24) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (z <= 2.9e+21) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); 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 <= -6.4e+71) tmp = t_1; elseif (z <= -1.12e+24) tmp = y * ((t - x) / (a - z)); elseif (z <= 2.9e+21) tmp = x + (y * ((t - x) / a)); 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, -6.4e+71], t$95$1, If[LessEqual[z, -1.12e+24], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+21], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $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 -6.4 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.12 \cdot 10^{+24}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+21}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.40000000000000046e71 or 2.9e21 < z Initial program 39.3%
associate-/l*63.4%
clear-num63.3%
un-div-inv63.3%
Applied egg-rr63.3%
Taylor expanded in x around 0 43.3%
associate-*r/67.2%
Simplified67.2%
if -6.40000000000000046e71 < z < -1.12e24Initial program 68.6%
associate-/l*73.9%
clear-num74.0%
un-div-inv74.0%
Applied egg-rr74.0%
Taylor expanded in y around inf 74.9%
div-sub74.9%
Simplified74.9%
if -1.12e24 < z < 2.9e21Initial program 93.2%
Taylor expanded in z around 0 70.9%
associate-/l*76.7%
Simplified76.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -150.0) (not (<= z 2.9e+21))) (+ t (* y (/ (- x t) z))) (+ x (* y (/ (- t x) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -150.0) || !(z <= 2.9e+21)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (y * ((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 <= (-150.0d0)) .or. (.not. (z <= 2.9d+21))) then
tmp = t + (y * ((x - t) / z))
else
tmp = x + (y * ((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 <= -150.0) || !(z <= 2.9e+21)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (y * ((t - x) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -150.0) or not (z <= 2.9e+21): tmp = t + (y * ((x - t) / z)) else: tmp = x + (y * ((t - x) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -150.0) || !(z <= 2.9e+21)) tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); else tmp = Float64(x + Float64(y * 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 <= -150.0) || ~((z <= 2.9e+21))) tmp = t + (y * ((x - t) / z)); else tmp = x + (y * ((t - x) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -150.0], N[Not[LessEqual[z, 2.9e+21]], $MachinePrecision]], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -150 \lor \neg \left(z \leq 2.9 \cdot 10^{+21}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
\end{array}
\end{array}
if z < -150 or 2.9e21 < z Initial program 43.9%
Taylor expanded in z around inf 65.9%
associate--l+65.9%
distribute-lft-out--65.9%
div-sub65.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 -150 < z < 2.9e21Initial program 93.0%
Taylor expanded in y around inf 85.6%
associate-/l*90.1%
Simplified90.1%
Final simplification81.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.7e-95) (not (<= a 8e-7))) (+ x (* t (/ (- y z) (- a z)))) (+ t (* y (/ (- x t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.7e-95) || !(a <= 8e-7)) {
tmp = x + (t * ((y - z) / (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 <= (-4.7d-95)) .or. (.not. (a <= 8d-7))) then
tmp = x + (t * ((y - z) / (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 <= -4.7e-95) || !(a <= 8e-7)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t + (y * ((x - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.7e-95) or not (a <= 8e-7): tmp = x + (t * ((y - z) / (a - z))) else: tmp = t + (y * ((x - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.7e-95) || !(a <= 8e-7)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / 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 <= -4.7e-95) || ~((a <= 8e-7))) tmp = x + (t * ((y - z) / (a - z))); else tmp = t + (y * ((x - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.7e-95], N[Not[LessEqual[a, 8e-7]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $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 -4.7 \cdot 10^{-95} \lor \neg \left(a \leq 8 \cdot 10^{-7}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if a < -4.6999999999999998e-95 or 7.9999999999999996e-7 < a Initial program 64.6%
Taylor expanded in t around inf 59.5%
associate-/l*75.2%
Simplified75.2%
if -4.6999999999999998e-95 < a < 7.9999999999999996e-7Initial program 69.6%
Taylor expanded in z around inf 82.0%
associate--l+82.0%
distribute-lft-out--82.0%
div-sub82.8%
mul-1-neg82.8%
unsub-neg82.8%
distribute-rgt-out--82.8%
Simplified82.8%
Taylor expanded in y around inf 81.7%
associate-/l*86.4%
Simplified86.4%
Final simplification80.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.8e+24) (not (<= z 2.2e+14))) (* 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 <= -2.8e+24) || !(z <= 2.2e+14)) {
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 <= (-2.8d+24)) .or. (.not. (z <= 2.2d+14))) 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 <= -2.8e+24) || !(z <= 2.2e+14)) {
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 <= -2.8e+24) or not (z <= 2.2e+14): 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 <= -2.8e+24) || !(z <= 2.2e+14)) 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 <= -2.8e+24) || ~((z <= 2.2e+14))) 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, -2.8e+24], N[Not[LessEqual[z, 2.2e+14]], $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 -2.8 \cdot 10^{+24} \lor \neg \left(z \leq 2.2 \cdot 10^{+14}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -2.8000000000000002e24 or 2.2e14 < z Initial program 42.8%
associate-/l*65.1%
clear-num65.0%
un-div-inv65.0%
Applied egg-rr65.0%
Taylor expanded in x around 0 43.9%
associate-*r/64.8%
Simplified64.8%
if -2.8000000000000002e24 < z < 2.2e14Initial program 93.8%
Taylor expanded in t around inf 71.1%
associate-/l*76.4%
Simplified76.4%
Taylor expanded in z around 0 66.3%
Final simplification65.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.75e+38) (+ x (* t (/ (- y z) a))) (if (<= a 9e-7) (+ t (* y (/ (- x t) z))) (+ x (* y (/ (- t x) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.75e+38) {
tmp = x + (t * ((y - z) / a));
} else if (a <= 9e-7) {
tmp = t + (y * ((x - t) / 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 (a <= (-2.75d+38)) then
tmp = x + (t * ((y - z) / a))
else if (a <= 9d-7) then
tmp = t + (y * ((x - t) / 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 (a <= -2.75e+38) {
tmp = x + (t * ((y - z) / a));
} else if (a <= 9e-7) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.75e+38: tmp = x + (t * ((y - z) / a)) elif a <= 9e-7: tmp = t + (y * ((x - t) / z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.75e+38) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); elseif (a <= 9e-7) tmp = Float64(t + Float64(y * Float64(Float64(x - t) / 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 (a <= -2.75e+38) tmp = x + (t * ((y - z) / a)); elseif (a <= 9e-7) tmp = t + (y * ((x - t) / z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.75e+38], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e-7], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / 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}\;a \leq -2.75 \cdot 10^{+38}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-7}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if a < -2.7500000000000002e38Initial program 70.7%
Taylor expanded in t around inf 68.8%
associate-/l*85.4%
Simplified85.4%
Taylor expanded in a around inf 64.1%
associate-/l*73.4%
Simplified73.4%
if -2.7500000000000002e38 < a < 8.99999999999999959e-7Initial program 69.4%
Taylor expanded in z around inf 79.3%
associate--l+79.3%
distribute-lft-out--79.3%
div-sub80.0%
mul-1-neg80.0%
unsub-neg80.0%
distribute-rgt-out--80.0%
Simplified80.0%
Taylor expanded in y around inf 78.2%
associate-/l*82.7%
Simplified82.7%
if 8.99999999999999959e-7 < a Initial program 57.7%
Taylor expanded in z around 0 50.9%
associate-/l*63.2%
Simplified63.2%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.8e+24) (* t (/ (- z y) z)) (if (<= z 3.2e+14) (+ x (* t (/ y a))) (* t (- 1.0 (/ y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8e+24) {
tmp = t * ((z - y) / z);
} else if (z <= 3.2e+14) {
tmp = x + (t * (y / a));
} else {
tmp = t * (1.0 - (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.8d+24)) then
tmp = t * ((z - y) / z)
else if (z <= 3.2d+14) then
tmp = x + (t * (y / a))
else
tmp = t * (1.0d0 - (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.8e+24) {
tmp = t * ((z - y) / z);
} else if (z <= 3.2e+14) {
tmp = x + (t * (y / a));
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.8e+24: tmp = t * ((z - y) / z) elif z <= 3.2e+14: tmp = x + (t * (y / a)) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.8e+24) tmp = Float64(t * Float64(Float64(z - y) / z)); elseif (z <= 3.2e+14) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.8e+24) tmp = t * ((z - y) / z); elseif (z <= 3.2e+14) tmp = x + (t * (y / a)); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8e+24], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+14], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+24}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+14}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -2.8000000000000002e24Initial program 43.8%
Taylor expanded in a around 0 32.4%
mul-1-neg32.4%
unsub-neg32.4%
associate-/l*48.1%
Simplified48.1%
Taylor expanded in t around inf 51.3%
Taylor expanded in z around 0 51.3%
if -2.8000000000000002e24 < z < 3.2e14Initial program 93.8%
Taylor expanded in t around inf 71.1%
associate-/l*76.4%
Simplified76.4%
Taylor expanded in z around 0 66.3%
if 3.2e14 < z Initial program 41.4%
Taylor expanded in a around 0 34.3%
mul-1-neg34.3%
unsub-neg34.3%
associate-/l*54.9%
Simplified54.9%
Taylor expanded in t around inf 62.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.5e+71) (not (<= z 85000000000000.0))) t x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e+71) || !(z <= 85000000000000.0)) {
tmp = t;
} 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 ((z <= (-4.5d+71)) .or. (.not. (z <= 85000000000000.0d0))) then
tmp = t
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 ((z <= -4.5e+71) || !(z <= 85000000000000.0)) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.5e+71) or not (z <= 85000000000000.0): tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.5e+71) || !(z <= 85000000000000.0)) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.5e+71) || ~((z <= 85000000000000.0))) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.5e+71], N[Not[LessEqual[z, 85000000000000.0]], $MachinePrecision]], t, x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+71} \lor \neg \left(z \leq 85000000000000\right):\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.50000000000000043e71 or 8.5e13 < z Initial program 39.5%
Taylor expanded in z around inf 45.3%
if -4.50000000000000043e71 < z < 8.5e13Initial program 91.0%
Taylor expanded in a around inf 34.1%
Final simplification39.3%
(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%
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))))