
(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 15 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 -2e-304) (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 <= -2e-304) || !(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 <= -2e-304) || !(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, -2e-304], 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 -2 \cdot 10^{-304} \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))) < -1.99999999999999994e-304 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 72.7%
+-commutative72.7%
*-commutative72.7%
associate-/l*91.7%
fma-define91.7%
Simplified91.7%
if -1.99999999999999994e-304 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.9%
associate-/l*4.5%
Simplified4.5%
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.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -2e-304) (not (<= t_1 0.0)))
(+ x (/ -1.0 (/ (/ (- a z) (- z y)) (- t x))))
(- t (/ (* (- t x) (- y a)) 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 <= -2e-304) || !(t_1 <= 0.0)) {
tmp = x + (-1.0 / (((a - z) / (z - y)) / (t - x)));
} else {
tmp = t - (((t - x) * (y - 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) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) * (t - x)) / (a - z))
if ((t_1 <= (-2d-304)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((-1.0d0) / (((a - z) / (z - y)) / (t - x)))
else
tmp = t - (((t - x) * (y - a)) / 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 <= -2e-304) || !(t_1 <= 0.0)) {
tmp = x + (-1.0 / (((a - z) / (z - y)) / (t - x)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if (t_1 <= -2e-304) or not (t_1 <= 0.0): tmp = x + (-1.0 / (((a - z) / (z - y)) / (t - x))) else: tmp = t - (((t - x) * (y - a)) / 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 <= -2e-304) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(a - z) / Float64(z - y)) / Float64(t - x)))); else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / 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 <= -2e-304) || ~((t_1 <= 0.0))) tmp = x + (-1.0 / (((a - z) / (z - y)) / (t - x))); else tmp = t - (((t - x) * (y - a)) / 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, -2e-304], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(-1.0 / N[(N[(N[(a - z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $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 -2 \cdot 10^{-304} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{-1}{\frac{\frac{a - z}{z - y}}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999994e-304 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 72.7%
associate-/l*88.4%
Simplified88.4%
associate-*r/72.7%
clear-num72.6%
associate-/r*91.6%
Applied egg-rr91.6%
if -1.99999999999999994e-304 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.9%
associate-/l*4.5%
Simplified4.5%
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.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.9e+229)
(+ t (* a (/ (- t x) z)))
(if (or (<= z -6e+40) (not (<= z 350.0)))
(* t (/ (- y z) (- a z)))
(+ x (/ -1.0 (/ (/ a y) (- x t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e+229) {
tmp = t + (a * ((t - x) / z));
} else if ((z <= -6e+40) || !(z <= 350.0)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (-1.0 / ((a / y) / (x - 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 <= (-2.9d+229)) then
tmp = t + (a * ((t - x) / z))
else if ((z <= (-6d+40)) .or. (.not. (z <= 350.0d0))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((-1.0d0) / ((a / y) / (x - 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 <= -2.9e+229) {
tmp = t + (a * ((t - x) / z));
} else if ((z <= -6e+40) || !(z <= 350.0)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (-1.0 / ((a / y) / (x - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.9e+229: tmp = t + (a * ((t - x) / z)) elif (z <= -6e+40) or not (z <= 350.0): tmp = t * ((y - z) / (a - z)) else: tmp = x + (-1.0 / ((a / y) / (x - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.9e+229) tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); elseif ((z <= -6e+40) || !(z <= 350.0)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(-1.0 / Float64(Float64(a / y) / Float64(x - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.9e+229) tmp = t + (a * ((t - x) / z)); elseif ((z <= -6e+40) || ~((z <= 350.0))) tmp = t * ((y - z) / (a - z)); else tmp = x + (-1.0 / ((a / y) / (x - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e+229], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -6e+40], N[Not[LessEqual[z, 350.0]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-1.0 / N[(N[(a / y), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+229}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq -6 \cdot 10^{+40} \lor \neg \left(z \leq 350\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-1}{\frac{\frac{a}{y}}{x - t}}\\
\end{array}
\end{array}
if z < -2.89999999999999981e229Initial program 20.4%
Taylor expanded in y around 0 17.0%
mul-1-neg17.0%
distribute-lft-neg-out17.0%
*-commutative17.0%
Simplified17.0%
Taylor expanded in z around inf 79.8%
associate-/l*88.0%
Simplified88.0%
if -2.89999999999999981e229 < z < -6.0000000000000004e40 or 350 < z Initial program 52.6%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in x around 0 38.6%
associate-/l*60.7%
Simplified60.7%
if -6.0000000000000004e40 < z < 350Initial program 90.4%
associate-/l*97.7%
Simplified97.7%
associate-*r/90.4%
clear-num90.4%
associate-/r*97.6%
Applied egg-rr97.6%
Taylor expanded in z around 0 74.7%
associate-/r*82.0%
Simplified82.0%
Final simplification74.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y z) (/ (- a z) t)))))
(if (<= a -1.25e+87)
t_1
(if (<= a -1600000000.0)
(+ x (/ -1.0 (/ (/ a y) (- x t))))
(if (<= a 1.7e-43) (- t (/ (* (- t x) (- y a)) z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) / ((a - z) / t));
double tmp;
if (a <= -1.25e+87) {
tmp = t_1;
} else if (a <= -1600000000.0) {
tmp = x + (-1.0 / ((a / y) / (x - t)));
} else if (a <= 1.7e-43) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) / ((a - z) / t))
if (a <= (-1.25d+87)) then
tmp = t_1
else if (a <= (-1600000000.0d0)) then
tmp = x + ((-1.0d0) / ((a / y) / (x - t)))
else if (a <= 1.7d-43) then
tmp = t - (((t - x) * (y - a)) / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) / ((a - z) / t));
double tmp;
if (a <= -1.25e+87) {
tmp = t_1;
} else if (a <= -1600000000.0) {
tmp = x + (-1.0 / ((a / y) / (x - t)));
} else if (a <= 1.7e-43) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) / ((a - z) / t)) tmp = 0 if a <= -1.25e+87: tmp = t_1 elif a <= -1600000000.0: tmp = x + (-1.0 / ((a / y) / (x - t))) elif a <= 1.7e-43: tmp = t - (((t - x) * (y - a)) / z) 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) / t))) tmp = 0.0 if (a <= -1.25e+87) tmp = t_1; elseif (a <= -1600000000.0) tmp = Float64(x + Float64(-1.0 / Float64(Float64(a / y) / Float64(x - t)))); elseif (a <= 1.7e-43) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); 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)); tmp = 0.0; if (a <= -1.25e+87) tmp = t_1; elseif (a <= -1600000000.0) tmp = x + (-1.0 / ((a / y) / (x - t))); elseif (a <= 1.7e-43) tmp = t - (((t - x) * (y - a)) / z); 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] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.25e+87], t$95$1, If[LessEqual[a, -1600000000.0], N[(x + N[(-1.0 / N[(N[(a / y), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e-43], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{if}\;a \leq -1.25 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1600000000:\\
\;\;\;\;x + \frac{-1}{\frac{\frac{a}{y}}{x - t}}\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-43}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.24999999999999995e87 or 1.7e-43 < a Initial program 70.8%
associate-/l*89.6%
Simplified89.6%
clear-num89.5%
un-div-inv89.5%
Applied egg-rr89.5%
Taylor expanded in t around inf 80.6%
if -1.24999999999999995e87 < a < -1.6e9Initial program 80.9%
associate-/l*92.4%
Simplified92.4%
associate-*r/80.9%
clear-num80.8%
associate-/r*92.7%
Applied egg-rr92.7%
Taylor expanded in z around 0 70.2%
associate-/r*76.1%
Simplified76.1%
if -1.6e9 < a < 1.7e-43Initial program 65.6%
associate-/l*76.1%
Simplified76.1%
Taylor expanded in z around inf 77.3%
associate--l+77.3%
associate-*r/77.3%
associate-*r/77.3%
mul-1-neg77.3%
div-sub77.4%
mul-1-neg77.4%
distribute-lft-out--77.4%
associate-*r/77.4%
mul-1-neg77.4%
unsub-neg77.4%
distribute-rgt-out--77.4%
Simplified77.4%
Final simplification79.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.2e+231)
(+ t (* a (/ (- t x) z)))
(if (or (<= z -5.5e+41) (not (<= z 94.0)))
(* 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 <= -9.2e+231) {
tmp = t + (a * ((t - x) / z));
} else if ((z <= -5.5e+41) || !(z <= 94.0)) {
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 <= (-9.2d+231)) then
tmp = t + (a * ((t - x) / z))
else if ((z <= (-5.5d+41)) .or. (.not. (z <= 94.0d0))) 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 <= -9.2e+231) {
tmp = t + (a * ((t - x) / z));
} else if ((z <= -5.5e+41) || !(z <= 94.0)) {
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 <= -9.2e+231: tmp = t + (a * ((t - x) / z)) elif (z <= -5.5e+41) or not (z <= 94.0): 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 <= -9.2e+231) tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); elseif ((z <= -5.5e+41) || !(z <= 94.0)) 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 <= -9.2e+231) tmp = t + (a * ((t - x) / z)); elseif ((z <= -5.5e+41) || ~((z <= 94.0))) 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[LessEqual[z, -9.2e+231], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -5.5e+41], N[Not[LessEqual[z, 94.0]], $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 -9.2 \cdot 10^{+231}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{+41} \lor \neg \left(z \leq 94\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -9.19999999999999997e231Initial program 20.4%
Taylor expanded in y around 0 17.0%
mul-1-neg17.0%
distribute-lft-neg-out17.0%
*-commutative17.0%
Simplified17.0%
Taylor expanded in z around inf 79.8%
associate-/l*88.0%
Simplified88.0%
if -9.19999999999999997e231 < z < -5.5000000000000003e41 or 94 < z Initial program 52.6%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in x around 0 38.6%
associate-/l*60.7%
Simplified60.7%
if -5.5000000000000003e41 < z < 94Initial program 90.4%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in z around 0 74.8%
associate-/l*81.3%
Simplified81.3%
Final simplification73.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.65e+236)
(+ t (* a (/ (- t x) z)))
(if (or (<= z -3e+61) (not (<= z 9.2)))
(* t (/ (- y z) (- a z)))
(+ x (* t (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+236) {
tmp = t + (a * ((t - x) / z));
} else if ((z <= -3e+61) || !(z <= 9.2)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.65d+236)) then
tmp = t + (a * ((t - x) / z))
else if ((z <= (-3d+61)) .or. (.not. (z <= 9.2d0))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+236) {
tmp = t + (a * ((t - x) / z));
} else if ((z <= -3e+61) || !(z <= 9.2)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.65e+236: tmp = t + (a * ((t - x) / z)) elif (z <= -3e+61) or not (z <= 9.2): tmp = t * ((y - z) / (a - z)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.65e+236) tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); elseif ((z <= -3e+61) || !(z <= 9.2)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.65e+236) tmp = t + (a * ((t - x) / z)); elseif ((z <= -3e+61) || ~((z <= 9.2))) tmp = t * ((y - z) / (a - z)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.65e+236], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3e+61], N[Not[LessEqual[z, 9.2]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+236}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+61} \lor \neg \left(z \leq 9.2\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.6499999999999999e236Initial program 20.4%
Taylor expanded in y around 0 17.0%
mul-1-neg17.0%
distribute-lft-neg-out17.0%
*-commutative17.0%
Simplified17.0%
Taylor expanded in z around inf 79.8%
associate-/l*88.0%
Simplified88.0%
if -1.6499999999999999e236 < z < -3e61 or 9.1999999999999993 < z Initial program 53.2%
associate-/l*77.3%
Simplified77.3%
Taylor expanded in x around 0 38.8%
associate-/l*61.5%
Simplified61.5%
if -3e61 < z < 9.1999999999999993Initial program 89.2%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in z around 0 73.1%
associate-/l*79.6%
Simplified79.6%
Taylor expanded in t around inf 64.7%
associate-/l*69.7%
Simplified69.7%
Final simplification68.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1e+226) (not (<= z 3.2e+219))) (+ t (* a (/ (- t x) z))) (+ x (* (- y z) (/ (- t x) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1e+226) || !(z <= 3.2e+219)) {
tmp = t + (a * ((t - x) / z));
} else {
tmp = x + ((y - z) * ((t - x) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1d+226)) .or. (.not. (z <= 3.2d+219))) then
tmp = t + (a * ((t - x) / z))
else
tmp = x + ((y - z) * ((t - x) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1e+226) || !(z <= 3.2e+219)) {
tmp = t + (a * ((t - x) / z));
} else {
tmp = x + ((y - z) * ((t - x) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1e+226) or not (z <= 3.2e+219): tmp = t + (a * ((t - x) / z)) else: tmp = x + ((y - z) * ((t - x) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1e+226) || !(z <= 3.2e+219)) tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); else tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1e+226) || ~((z <= 3.2e+219))) tmp = t + (a * ((t - x) / z)); else tmp = x + ((y - z) * ((t - x) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1e+226], N[Not[LessEqual[z, 3.2e+219]], $MachinePrecision]], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+226} \lor \neg \left(z \leq 3.2 \cdot 10^{+219}\right):\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\end{array}
\end{array}
if z < -9.99999999999999961e225 or 3.20000000000000026e219 < z Initial program 17.5%
Taylor expanded in y around 0 15.6%
mul-1-neg15.6%
distribute-lft-neg-out15.6%
*-commutative15.6%
Simplified15.6%
Taylor expanded in z around inf 70.7%
associate-/l*84.4%
Simplified84.4%
if -9.99999999999999961e225 < z < 3.20000000000000026e219Initial program 79.4%
associate-/l*91.6%
Simplified91.6%
Final simplification90.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.2e-68) (not (<= t 9.5e-23))) (+ x (/ (- y z) (/ (- a z) t))) (* x (+ (/ (- y z) (- z a)) 1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.2e-68) || !(t <= 9.5e-23)) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = x * (((y - z) / (z - a)) + 1.0);
}
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 <= (-3.2d-68)) .or. (.not. (t <= 9.5d-23))) then
tmp = x + ((y - z) / ((a - z) / t))
else
tmp = x * (((y - z) / (z - a)) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.2e-68) || !(t <= 9.5e-23)) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = x * (((y - z) / (z - a)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.2e-68) or not (t <= 9.5e-23): tmp = x + ((y - z) / ((a - z) / t)) else: tmp = x * (((y - z) / (z - a)) + 1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.2e-68) || !(t <= 9.5e-23)) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); else tmp = Float64(x * Float64(Float64(Float64(y - z) / Float64(z - a)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.2e-68) || ~((t <= 9.5e-23))) tmp = x + ((y - z) / ((a - z) / t)); else tmp = x * (((y - z) / (z - a)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.2e-68], N[Not[LessEqual[t, 9.5e-23]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-68} \lor \neg \left(t \leq 9.5 \cdot 10^{-23}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\
\end{array}
\end{array}
if t < -3.1999999999999999e-68 or 9.50000000000000058e-23 < t Initial program 67.3%
associate-/l*93.0%
Simplified93.0%
clear-num92.9%
un-div-inv93.0%
Applied egg-rr93.0%
Taylor expanded in t around inf 84.7%
if -3.1999999999999999e-68 < t < 9.50000000000000058e-23Initial program 71.7%
associate-/l*73.0%
Simplified73.0%
Taylor expanded in x around inf 66.3%
mul-1-neg66.3%
unsub-neg66.3%
Simplified66.3%
Final simplification76.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.15e+74) x (if (<= a -5.5e-230) t (if (<= a 7e-109) (* x (/ y z)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.15e+74) {
tmp = x;
} else if (a <= -5.5e-230) {
tmp = t;
} else if (a <= 7e-109) {
tmp = x * (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 <= (-1.15d+74)) then
tmp = x
else if (a <= (-5.5d-230)) then
tmp = t
else if (a <= 7d-109) then
tmp = x * (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 <= -1.15e+74) {
tmp = x;
} else if (a <= -5.5e-230) {
tmp = t;
} else if (a <= 7e-109) {
tmp = x * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.15e+74: tmp = x elif a <= -5.5e-230: tmp = t elif a <= 7e-109: tmp = x * (y / z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.15e+74) tmp = x; elseif (a <= -5.5e-230) tmp = t; elseif (a <= 7e-109) tmp = Float64(x * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.15e+74) tmp = x; elseif (a <= -5.5e-230) tmp = t; elseif (a <= 7e-109) tmp = x * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.15e+74], x, If[LessEqual[a, -5.5e-230], t, If[LessEqual[a, 7e-109], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -5.5 \cdot 10^{-230}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-109}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.1499999999999999e74 or 7e-109 < a Initial program 70.9%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in a around inf 46.5%
if -1.1499999999999999e74 < a < -5.4999999999999997e-230Initial program 64.6%
associate-/l*76.3%
Simplified76.3%
Taylor expanded in z around inf 40.0%
if -5.4999999999999997e-230 < a < 7e-109Initial program 69.6%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in x around -inf 55.0%
associate-*r*55.0%
neg-mul-155.0%
Simplified55.0%
Taylor expanded in a around 0 43.2%
associate-/l*50.1%
Simplified50.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.6e+58) (not (<= z 6.0))) (* 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 <= -6.6e+58) || !(z <= 6.0)) {
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 <= (-6.6d+58)) .or. (.not. (z <= 6.0d0))) 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 <= -6.6e+58) || !(z <= 6.0)) {
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 <= -6.6e+58) or not (z <= 6.0): 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 <= -6.6e+58) || !(z <= 6.0)) 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 <= -6.6e+58) || ~((z <= 6.0))) 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, -6.6e+58], N[Not[LessEqual[z, 6.0]], $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 -6.6 \cdot 10^{+58} \lor \neg \left(z \leq 6\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -6.59999999999999966e58 or 6 < z Initial program 46.9%
associate-/l*70.4%
Simplified70.4%
Taylor expanded in x around 0 39.3%
associate-/l*63.2%
Simplified63.2%
if -6.59999999999999966e58 < z < 6Initial program 89.2%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in z around 0 73.1%
associate-/l*79.6%
Simplified79.6%
Taylor expanded in t around inf 64.7%
associate-/l*69.7%
Simplified69.7%
Final simplification66.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.46e+61) (not (<= z 4.6e+212))) (* t (/ z (- z a))) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.46e+61) || !(z <= 4.6e+212)) {
tmp = t * (z / (z - a));
} 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.46d+61)) .or. (.not. (z <= 4.6d+212))) then
tmp = t * (z / (z - a))
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.46e+61) || !(z <= 4.6e+212)) {
tmp = t * (z / (z - a));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.46e+61) or not (z <= 4.6e+212): tmp = t * (z / (z - a)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.46e+61) || !(z <= 4.6e+212)) tmp = Float64(t * Float64(z / Float64(z - a))); 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.46e+61) || ~((z <= 4.6e+212))) tmp = t * (z / (z - a)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.46e+61], N[Not[LessEqual[z, 4.6e+212]], $MachinePrecision]], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.46 \cdot 10^{+61} \lor \neg \left(z \leq 4.6 \cdot 10^{+212}\right):\\
\;\;\;\;t \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -2.46e61 or 4.5999999999999997e212 < z Initial program 33.6%
associate-/l*64.1%
Simplified64.1%
Taylor expanded in y around 0 28.1%
mul-1-neg28.1%
unsub-neg28.1%
associate-/l*51.9%
Simplified51.9%
Taylor expanded in x around 0 32.7%
mul-1-neg32.7%
associate-/l*60.6%
Simplified60.6%
if -2.46e61 < z < 4.5999999999999997e212Initial program 84.9%
associate-/l*92.8%
Simplified92.8%
Taylor expanded in z around 0 63.1%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in t around inf 56.9%
associate-/l*61.2%
Simplified61.2%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -9e+68) t (if (<= z 4.6e+212) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+68) {
tmp = t;
} else if (z <= 4.6e+212) {
tmp = x + (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 <= (-9d+68)) then
tmp = t
else if (z <= 4.6d+212) then
tmp = x + (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 <= -9e+68) {
tmp = t;
} else if (z <= 4.6e+212) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9e+68: tmp = t elif z <= 4.6e+212: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9e+68) tmp = t; elseif (z <= 4.6e+212) tmp = Float64(x + 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 <= -9e+68) tmp = t; elseif (z <= 4.6e+212) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e+68], t, If[LessEqual[z, 4.6e+212], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+68}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+212}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.0000000000000007e68 or 4.5999999999999997e212 < z Initial program 33.6%
associate-/l*64.1%
Simplified64.1%
Taylor expanded in z around inf 54.5%
if -9.0000000000000007e68 < z < 4.5999999999999997e212Initial program 84.9%
associate-/l*92.8%
Simplified92.8%
Taylor expanded in z around 0 63.1%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in t around inf 56.9%
associate-/l*61.2%
Simplified61.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.35e+46) t (if (<= z 1.65e+217) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e+46) {
tmp = t;
} else if (z <= 1.65e+217) {
tmp = x * (1.0 - (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 <= (-1.35d+46)) then
tmp = t
else if (z <= 1.65d+217) then
tmp = x * (1.0d0 - (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 <= -1.35e+46) {
tmp = t;
} else if (z <= 1.65e+217) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.35e+46: tmp = t elif z <= 1.65e+217: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.35e+46) tmp = t; elseif (z <= 1.65e+217) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.35e+46) tmp = t; elseif (z <= 1.65e+217) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e+46], t, If[LessEqual[z, 1.65e+217], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+46}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+217}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.3500000000000001e46 or 1.65e217 < z Initial program 33.2%
associate-/l*63.4%
Simplified63.4%
Taylor expanded in z around inf 55.1%
if -1.3500000000000001e46 < z < 1.65e217Initial program 85.3%
associate-/l*93.4%
Simplified93.4%
Taylor expanded in z around 0 63.5%
associate-/l*68.4%
Simplified68.4%
Taylor expanded in t around 0 47.7%
associate-*r/47.7%
mul-1-neg47.7%
Simplified47.7%
Taylor expanded in x around 0 49.3%
mul-1-neg49.3%
sub-neg49.3%
Simplified49.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.78e+75) x (if (<= a 4e-43) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.78e+75) {
tmp = x;
} else if (a <= 4e-43) {
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 (a <= (-1.78d+75)) then
tmp = x
else if (a <= 4d-43) 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 (a <= -1.78e+75) {
tmp = x;
} else if (a <= 4e-43) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.78e+75: tmp = x elif a <= 4e-43: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.78e+75) tmp = x; elseif (a <= 4e-43) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.78e+75) tmp = x; elseif (a <= 4e-43) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.78e+75], x, If[LessEqual[a, 4e-43], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.78 \cdot 10^{+75}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-43}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.78e75 or 4.00000000000000031e-43 < a Initial program 70.9%
associate-/l*89.8%
Simplified89.8%
Taylor expanded in a around inf 49.6%
if -1.78e75 < a < 4.00000000000000031e-43Initial program 67.4%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in z around inf 34.2%
(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 69.2%
associate-/l*84.1%
Simplified84.1%
Taylor expanded in z around inf 23.0%
(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 2024118
(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))))