
(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 -5e-272) (not (<= t_1 0.0)))
(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 <= -5e-272) || !(t_1 <= 0.0)) {
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 <= -5e-272) || !(t_1 <= 0.0)) 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, -5e-272], N[Not[LessEqual[t$95$1, 0.0]], $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 -5 \cdot 10^{-272} \lor \neg \left(t\_1 \leq 0\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))) < -4.99999999999999982e-272 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 70.1%
+-commutative70.1%
*-commutative70.1%
associate-/l*91.7%
fma-define91.7%
Simplified91.7%
if -4.99999999999999982e-272 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.1%
associate-/l*3.9%
Simplified3.9%
Taylor expanded in z around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.7%
mul-1-neg99.7%
distribute-lft-out--99.7%
associate-*r/99.7%
mul-1-neg99.7%
unsub-neg99.7%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification92.5%
(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 (- INFINITY))
t_1
(if (<= t_2 -5e-272)
t_2
(if (<= t_2 5e-305)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= t_2 1e+267) 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 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -5e-272) {
tmp = t_2;
} else if (t_2 <= 5e-305) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 1e+267) {
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 = x + ((y - z) * ((t - x) / (a - 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 <= -5e-272) {
tmp = t_2;
} else if (t_2 <= 5e-305) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 1e+267) {
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 <= -math.inf: tmp = t_1 elif t_2 <= -5e-272: tmp = t_2 elif t_2 <= 5e-305: tmp = t + (((t - x) * (a - y)) / z) elif t_2 <= 1e+267: 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 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -5e-272) tmp = t_2; elseif (t_2 <= 5e-305) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (t_2 <= 1e+267) 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 <= -Inf) tmp = t_1; elseif (t_2 <= -5e-272) tmp = t_2; elseif (t_2 <= 5e-305) tmp = t + (((t - x) * (a - y)) / z); elseif (t_2 <= 1e+267) 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, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -5e-272], t$95$2, If[LessEqual[t$95$2, 5e-305], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+267], 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 -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-272}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-305}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 10^{+267}:\\
\;\;\;\;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 9.9999999999999997e266 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 36.3%
associate-/l*83.3%
Simplified83.3%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999982e-272 or 4.99999999999999985e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 9.9999999999999997e266Initial program 98.6%
if -4.99999999999999982e-272 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 4.99999999999999985e-305Initial program 4.2%
associate-/l*7.9%
Simplified7.9%
Taylor expanded in z around inf 95.9%
associate--l+95.9%
associate-*r/95.9%
associate-*r/95.9%
mul-1-neg95.9%
div-sub95.8%
mul-1-neg95.8%
distribute-lft-out--95.8%
associate-*r/95.8%
mul-1-neg95.8%
unsub-neg95.8%
distribute-rgt-out--95.9%
Simplified95.9%
Final simplification92.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -5e-272) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (/ (* (- t x) (- a y)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -5e-272) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) * (t - x)) / (a - z))
if ((t_1 <= (-5d-272)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -5e-272) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if (t_1 <= -5e-272) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -5e-272) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if ((t_1 <= -5e-272) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-272], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-272} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999982e-272 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 70.1%
associate-/l*85.2%
Simplified85.2%
*-commutative85.2%
associate-*l/70.1%
associate-*r/91.7%
clear-num91.3%
un-div-inv91.4%
Applied egg-rr91.4%
if -4.99999999999999982e-272 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.1%
associate-/l*3.9%
Simplified3.9%
Taylor expanded in z around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.7%
mul-1-neg99.7%
distribute-lft-out--99.7%
associate-*r/99.7%
mul-1-neg99.7%
unsub-neg99.7%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification92.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.1e+175)
(* t (/ (- y z) (- a z)))
(if (<= z 7.4e+253)
(+ x (* (- y z) (/ (- t x) (- a z))))
(+ t (/ (* (- t x) (- a y)) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.1e+175) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 7.4e+253) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.1d+175)) then
tmp = t * ((y - z) / (a - z))
else if (z <= 7.4d+253) then
tmp = x + ((y - z) * ((t - x) / (a - z)))
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.1e+175) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 7.4e+253) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.1e+175: tmp = t * ((y - z) / (a - z)) elif z <= 7.4e+253: tmp = x + ((y - z) * ((t - x) / (a - z))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.1e+175) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= 7.4e+253) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.1e+175) tmp = t * ((y - z) / (a - z)); elseif (z <= 7.4e+253) tmp = x + ((y - z) * ((t - x) / (a - z))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.1e+175], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.4e+253], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+175}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{+253}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if z < -1.1e175Initial program 33.9%
associate-/l*49.6%
Simplified49.6%
Taylor expanded in x around 0 44.3%
associate-/l*79.9%
Simplified79.9%
if -1.1e175 < z < 7.40000000000000057e253Initial program 71.3%
associate-/l*84.8%
Simplified84.8%
if 7.40000000000000057e253 < z Initial program 22.3%
associate-/l*35.7%
Simplified35.7%
Taylor expanded in z around inf 80.6%
associate--l+80.6%
associate-*r/80.6%
associate-*r/80.6%
mul-1-neg80.6%
div-sub80.6%
mul-1-neg80.6%
distribute-lft-out--80.6%
associate-*r/80.6%
mul-1-neg80.6%
unsub-neg80.6%
distribute-rgt-out--80.6%
Simplified80.6%
Final simplification84.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.2e+29)
(/ t (/ a (- y z)))
(if (<= t 1.4e+35)
(* x (- 1.0 (/ y a)))
(if (<= t 1.55e+86) t (* t (/ (- y z) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+29) {
tmp = t / (a / (y - z));
} else if (t <= 1.4e+35) {
tmp = x * (1.0 - (y / a));
} else if (t <= 1.55e+86) {
tmp = t;
} else {
tmp = t * ((y - z) / 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 (t <= (-6.2d+29)) then
tmp = t / (a / (y - z))
else if (t <= 1.4d+35) then
tmp = x * (1.0d0 - (y / a))
else if (t <= 1.55d+86) then
tmp = t
else
tmp = t * ((y - z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+29) {
tmp = t / (a / (y - z));
} else if (t <= 1.4e+35) {
tmp = x * (1.0 - (y / a));
} else if (t <= 1.55e+86) {
tmp = t;
} else {
tmp = t * ((y - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.2e+29: tmp = t / (a / (y - z)) elif t <= 1.4e+35: tmp = x * (1.0 - (y / a)) elif t <= 1.55e+86: tmp = t else: tmp = t * ((y - z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e+29) tmp = Float64(t / Float64(a / Float64(y - z))); elseif (t <= 1.4e+35) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (t <= 1.55e+86) tmp = t; else tmp = Float64(t * Float64(Float64(y - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.2e+29) tmp = t / (a / (y - z)); elseif (t <= 1.4e+35) tmp = x * (1.0 - (y / a)); elseif (t <= 1.55e+86) tmp = t; else tmp = t * ((y - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e+29], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e+35], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e+86], t, N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+29}:\\
\;\;\;\;\frac{t}{\frac{a}{y - z}}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+35}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+86}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\end{array}
\end{array}
if t < -6.1999999999999998e29Initial program 61.6%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in x around 0 50.4%
Taylor expanded in a around inf 41.2%
associate-/l*49.6%
Simplified49.6%
clear-num49.6%
un-div-inv49.7%
Applied egg-rr49.7%
if -6.1999999999999998e29 < t < 1.39999999999999999e35Initial program 69.5%
associate-/l*68.3%
Simplified68.3%
*-commutative68.3%
associate-*l/69.5%
associate-*r/75.1%
clear-num75.1%
un-div-inv75.1%
Applied egg-rr75.1%
Taylor expanded in z around 0 50.1%
Taylor expanded in x around inf 44.2%
mul-1-neg44.2%
unsub-neg44.2%
Simplified44.2%
if 1.39999999999999999e35 < t < 1.5500000000000001e86Initial program 47.7%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in z around inf 61.0%
if 1.5500000000000001e86 < t Initial program 59.1%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in x around 0 48.4%
Taylor expanded in a around inf 37.7%
associate-/l*56.9%
Simplified56.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) a))))
(if (<= t -5.9e+29)
t_1
(if (<= t 7.2e+34) (* x (- 1.0 (/ y a))) (if (<= t 1.15e+86) t t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / a);
double tmp;
if (t <= -5.9e+29) {
tmp = t_1;
} else if (t <= 7.2e+34) {
tmp = x * (1.0 - (y / a));
} else if (t <= 1.15e+86) {
tmp = t;
} 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)
if (t <= (-5.9d+29)) then
tmp = t_1
else if (t <= 7.2d+34) then
tmp = x * (1.0d0 - (y / a))
else if (t <= 1.15d+86) then
tmp = t
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);
double tmp;
if (t <= -5.9e+29) {
tmp = t_1;
} else if (t <= 7.2e+34) {
tmp = x * (1.0 - (y / a));
} else if (t <= 1.15e+86) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / a) tmp = 0 if t <= -5.9e+29: tmp = t_1 elif t <= 7.2e+34: tmp = x * (1.0 - (y / a)) elif t <= 1.15e+86: tmp = t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / a)) tmp = 0.0 if (t <= -5.9e+29) tmp = t_1; elseif (t <= 7.2e+34) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (t <= 1.15e+86) tmp = t; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / a); tmp = 0.0; if (t <= -5.9e+29) tmp = t_1; elseif (t <= 7.2e+34) tmp = x * (1.0 - (y / a)); elseif (t <= 1.15e+86) tmp = t; 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] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.9e+29], t$95$1, If[LessEqual[t, 7.2e+34], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+86], t, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a}\\
\mathbf{if}\;t \leq -5.9 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+86}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.8999999999999999e29 or 1.14999999999999995e86 < t Initial program 60.4%
associate-/l*90.2%
Simplified90.2%
Taylor expanded in x around 0 49.4%
Taylor expanded in a around inf 39.5%
associate-/l*53.2%
Simplified53.2%
if -5.8999999999999999e29 < t < 7.2000000000000001e34Initial program 69.5%
associate-/l*68.3%
Simplified68.3%
*-commutative68.3%
associate-*l/69.5%
associate-*r/75.1%
clear-num75.1%
un-div-inv75.1%
Applied egg-rr75.1%
Taylor expanded in z around 0 50.1%
Taylor expanded in x around inf 44.2%
mul-1-neg44.2%
unsub-neg44.2%
Simplified44.2%
if 7.2000000000000001e34 < t < 1.14999999999999995e86Initial program 47.7%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in z around inf 61.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.8e+147)
(* t (/ (- y z) (- a z)))
(if (<= z 1.3e+101)
(+ x (* (- t x) (/ (- y z) a)))
(/ t (/ (- a z) (- y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e+147) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 1.3e+101) {
tmp = x + ((t - x) * ((y - z) / a));
} else {
tmp = t / ((a - z) / (y - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.8d+147)) then
tmp = t * ((y - z) / (a - z))
else if (z <= 1.3d+101) then
tmp = x + ((t - x) * ((y - z) / a))
else
tmp = t / ((a - z) / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e+147) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 1.3e+101) {
tmp = x + ((t - x) * ((y - z) / a));
} else {
tmp = t / ((a - z) / (y - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.8e+147: tmp = t * ((y - z) / (a - z)) elif z <= 1.3e+101: tmp = x + ((t - x) * ((y - z) / a)) else: tmp = t / ((a - z) / (y - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.8e+147) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= 1.3e+101) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a))); else tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.8e+147) tmp = t * ((y - z) / (a - z)); elseif (z <= 1.3e+101) tmp = x + ((t - x) * ((y - z) / a)); else tmp = t / ((a - z) / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.8e+147], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+101], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+147}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+101}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if z < -8.8000000000000007e147Initial program 34.5%
associate-/l*54.0%
Simplified54.0%
Taylor expanded in x around 0 39.9%
associate-/l*74.5%
Simplified74.5%
if -8.8000000000000007e147 < z < 1.3e101Initial program 80.3%
associate-/l*87.5%
Simplified87.5%
Taylor expanded in a around inf 67.7%
associate-/l*77.3%
Simplified77.3%
if 1.3e101 < z Initial program 32.9%
associate-/l*64.2%
Simplified64.2%
Taylor expanded in x around 0 36.8%
associate-/l*69.0%
*-un-lft-identity69.0%
clear-num69.0%
div-inv69.1%
Applied egg-rr69.1%
*-un-lft-identity69.1%
Applied egg-rr69.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -15500.0) t (if (<= z -5.7e-126) x (if (<= z 1.85e+133) (* t (/ y a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -15500.0) {
tmp = t;
} else if (z <= -5.7e-126) {
tmp = x;
} else if (z <= 1.85e+133) {
tmp = t * (y / a);
} 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 <= (-15500.0d0)) then
tmp = t
else if (z <= (-5.7d-126)) then
tmp = x
else if (z <= 1.85d+133) then
tmp = t * (y / a)
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 <= -15500.0) {
tmp = t;
} else if (z <= -5.7e-126) {
tmp = x;
} else if (z <= 1.85e+133) {
tmp = t * (y / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -15500.0: tmp = t elif z <= -5.7e-126: tmp = x elif z <= 1.85e+133: tmp = t * (y / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -15500.0) tmp = t; elseif (z <= -5.7e-126) tmp = x; elseif (z <= 1.85e+133) tmp = Float64(t * Float64(y / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -15500.0) tmp = t; elseif (z <= -5.7e-126) tmp = x; elseif (z <= 1.85e+133) tmp = t * (y / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -15500.0], t, If[LessEqual[z, -5.7e-126], x, If[LessEqual[z, 1.85e+133], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -15500:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.7 \cdot 10^{-126}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+133}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -15500 or 1.85000000000000012e133 < z Initial program 39.0%
associate-/l*64.5%
Simplified64.5%
Taylor expanded in z around inf 43.2%
if -15500 < z < -5.69999999999999979e-126Initial program 78.8%
associate-/l*87.2%
Simplified87.2%
Taylor expanded in a around inf 54.1%
if -5.69999999999999979e-126 < z < 1.85000000000000012e133Initial program 85.9%
associate-/l*89.2%
Simplified89.2%
Taylor expanded in x around 0 47.5%
Taylor expanded in z around 0 31.4%
associate-/l*37.8%
Simplified37.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3000.0) (not (<= z 1.1e-101))) (/ t (/ (- a z) (- y z))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3000.0) || !(z <= 1.1e-101)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3000.0d0)) .or. (.not. (z <= 1.1d-101))) then
tmp = t / ((a - z) / (y - z))
else
tmp = x + ((t - x) / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3000.0) || !(z <= 1.1e-101)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3000.0) or not (z <= 1.1e-101): tmp = t / ((a - z) / (y - z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3000.0) || !(z <= 1.1e-101)) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3000.0) || ~((z <= 1.1e-101))) tmp = t / ((a - z) / (y - z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3000.0], N[Not[LessEqual[z, 1.1e-101]], $MachinePrecision]], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3000 \lor \neg \left(z \leq 1.1 \cdot 10^{-101}\right):\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -3e3 or 1.0999999999999999e-101 < z Initial program 48.8%
associate-/l*71.3%
Simplified71.3%
Taylor expanded in x around 0 38.0%
associate-/l*62.8%
*-un-lft-identity62.8%
clear-num62.7%
div-inv62.8%
Applied egg-rr62.8%
*-un-lft-identity62.8%
Applied egg-rr62.8%
if -3e3 < z < 1.0999999999999999e-101Initial program 88.2%
associate-/l*88.3%
Simplified88.3%
*-commutative88.3%
associate-*l/88.2%
associate-*r/94.8%
clear-num93.9%
un-div-inv94.0%
Applied egg-rr94.0%
Taylor expanded in z around 0 83.9%
Final simplification71.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.6e-24) (not (<= z 2.1e-96))) (* t (/ (- y z) (- a z))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.6e-24) || !(z <= 2.1e-96)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.6d-24)) .or. (.not. (z <= 2.1d-96))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((t - x) / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.6e-24) || !(z <= 2.1e-96)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.6e-24) or not (z <= 2.1e-96): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.6e-24) || !(z <= 2.1e-96)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.6e-24) || ~((z <= 2.1e-96))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.6e-24], N[Not[LessEqual[z, 2.1e-96]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-24} \lor \neg \left(z \leq 2.1 \cdot 10^{-96}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -2.6e-24 or 2.10000000000000001e-96 < z Initial program 48.9%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in x around 0 37.7%
associate-/l*61.9%
Simplified61.9%
if -2.6e-24 < z < 2.10000000000000001e-96Initial program 89.8%
associate-/l*89.8%
Simplified89.8%
*-commutative89.8%
associate-*l/89.8%
associate-*r/96.6%
clear-num95.7%
un-div-inv95.8%
Applied egg-rr95.8%
Taylor expanded in z around 0 86.3%
Final simplification71.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.5e+63) (not (<= z 3.6e-113))) (* t (/ (- y z) (- a z))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e+63) || !(z <= 3.6e-113)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.5d+63)) .or. (.not. (z <= 3.6d-113))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y * ((t - x) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e+63) || !(z <= 3.6e-113)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.5e+63) or not (z <= 3.6e-113): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.5e+63) || !(z <= 3.6e-113)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.5e+63) || ~((z <= 3.6e-113))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.5e+63], N[Not[LessEqual[z, 3.6e-113]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+63} \lor \neg \left(z \leq 3.6 \cdot 10^{-113}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -4.50000000000000017e63 or 3.59999999999999975e-113 < z Initial program 47.0%
associate-/l*69.3%
Simplified69.3%
Taylor expanded in x around 0 37.9%
associate-/l*63.9%
Simplified63.9%
if -4.50000000000000017e63 < z < 3.59999999999999975e-113Initial program 86.6%
associate-/l*89.3%
Simplified89.3%
Taylor expanded in z around 0 74.2%
associate-/l*77.1%
Simplified77.1%
Final simplification69.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -8.2e+79) (not (<= y 1.05e+166))) (* y (/ (- t x) (- a z))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8.2e+79) || !(y <= 1.05e+166)) {
tmp = y * ((t - x) / (a - z));
} 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 ((y <= (-8.2d+79)) .or. (.not. (y <= 1.05d+166))) then
tmp = y * ((t - x) / (a - z))
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 ((y <= -8.2e+79) || !(y <= 1.05e+166)) {
tmp = y * ((t - x) / (a - z));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -8.2e+79) or not (y <= 1.05e+166): tmp = y * ((t - x) / (a - z)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -8.2e+79) || !(y <= 1.05e+166)) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); 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 ((y <= -8.2e+79) || ~((y <= 1.05e+166))) tmp = y * ((t - x) / (a - z)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -8.2e+79], N[Not[LessEqual[y, 1.05e+166]], $MachinePrecision]], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+79} \lor \neg \left(y \leq 1.05 \cdot 10^{+166}\right):\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if y < -8.2e79 or 1.05e166 < y Initial program 60.4%
associate-/l*85.0%
Simplified85.0%
Taylor expanded in y around inf 82.9%
div-sub82.9%
Simplified82.9%
if -8.2e79 < y < 1.05e166Initial program 66.1%
associate-/l*74.4%
Simplified74.4%
Taylor expanded in x around 0 42.8%
associate-/l*59.1%
Simplified59.1%
Final simplification67.0%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.55e+103) (* x (- 1.0 (/ y a))) (if (<= x 3.3e+121) (* t (/ (- y z) (- a z))) (* (- y a) (/ x z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.55e+103) {
tmp = x * (1.0 - (y / a));
} else if (x <= 3.3e+121) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = (y - a) * (x / 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 (x <= (-1.55d+103)) then
tmp = x * (1.0d0 - (y / a))
else if (x <= 3.3d+121) then
tmp = t * ((y - z) / (a - z))
else
tmp = (y - a) * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.55e+103) {
tmp = x * (1.0 - (y / a));
} else if (x <= 3.3e+121) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = (y - a) * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.55e+103: tmp = x * (1.0 - (y / a)) elif x <= 3.3e+121: tmp = t * ((y - z) / (a - z)) else: tmp = (y - a) * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.55e+103) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (x <= 3.3e+121) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(Float64(y - a) * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.55e+103) tmp = x * (1.0 - (y / a)); elseif (x <= 3.3e+121) tmp = t * ((y - z) / (a - z)); else tmp = (y - a) * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.55e+103], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.3e+121], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+103}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{+121}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < -1.5500000000000001e103Initial program 61.9%
associate-/l*78.0%
Simplified78.0%
*-commutative78.0%
associate-*l/61.9%
associate-*r/80.7%
clear-num80.7%
un-div-inv80.7%
Applied egg-rr80.7%
Taylor expanded in z around 0 64.0%
Taylor expanded in x around inf 61.0%
mul-1-neg61.0%
unsub-neg61.0%
Simplified61.0%
if -1.5500000000000001e103 < x < 3.29999999999999979e121Initial program 70.0%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in x around 0 53.8%
associate-/l*72.8%
Simplified72.8%
if 3.29999999999999979e121 < x Initial program 41.9%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in x around -inf 65.0%
associate-*r*65.0%
neg-mul-165.0%
Simplified65.0%
Taylor expanded in z around -inf 33.3%
associate-/l*46.7%
Applied egg-rr46.7%
associate-*r/33.3%
*-commutative33.3%
associate-*r/46.7%
*-commutative46.7%
Simplified46.7%
Final simplification66.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -8.8e+147) t (if (<= z 7e+133) (* t (/ (- y z) a)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e+147) {
tmp = t;
} else if (z <= 7e+133) {
tmp = t * ((y - z) / a);
} 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 <= (-8.8d+147)) then
tmp = t
else if (z <= 7d+133) then
tmp = t * ((y - z) / a)
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 <= -8.8e+147) {
tmp = t;
} else if (z <= 7e+133) {
tmp = t * ((y - z) / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.8e+147: tmp = t elif z <= 7e+133: tmp = t * ((y - z) / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.8e+147) tmp = t; elseif (z <= 7e+133) tmp = Float64(t * Float64(Float64(y - z) / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.8e+147) tmp = t; elseif (z <= 7e+133) tmp = t * ((y - z) / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.8e+147], t, If[LessEqual[z, 7e+133], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+147}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+133}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -8.8000000000000007e147 or 6.9999999999999997e133 < z Initial program 31.5%
associate-/l*57.9%
Simplified57.9%
Taylor expanded in z around inf 51.0%
if -8.8000000000000007e147 < z < 6.9999999999999997e133Initial program 80.2%
associate-/l*87.7%
Simplified87.7%
Taylor expanded in x around 0 43.0%
Taylor expanded in a around inf 33.3%
associate-/l*39.9%
Simplified39.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -2200.0) t (if (<= z 8.2e-36) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2200.0) {
tmp = t;
} else if (z <= 8.2e-36) {
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 <= (-2200.0d0)) then
tmp = t
else if (z <= 8.2d-36) 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 <= -2200.0) {
tmp = t;
} else if (z <= 8.2e-36) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2200.0: tmp = t elif z <= 8.2e-36: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2200.0) tmp = t; elseif (z <= 8.2e-36) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2200.0) tmp = t; elseif (z <= 8.2e-36) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2200.0], t, If[LessEqual[z, 8.2e-36], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2200:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-36}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2200 or 8.20000000000000025e-36 < z Initial program 44.5%
associate-/l*68.5%
Simplified68.5%
Taylor expanded in z around inf 38.5%
if -2200 < z < 8.20000000000000025e-36Initial program 88.7%
associate-/l*89.7%
Simplified89.7%
Taylor expanded in a around inf 34.7%
(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 64.2%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in z around inf 23.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024116
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))