
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_1 -5e-283)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= t_1 0.0)
(+ t (* (- t x) (/ (- a y) z)))
(+ x (/ -1.0 (/ (/ (- a z) (- y z)) (- x t))))))))
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-283) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (t_1 <= 0.0) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t)));
}
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-283) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(a - z) / Float64(y - z)) / Float64(x - t)))); 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[LessEqual[t$95$1, -5e-283], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-1.0 / N[(N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $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^{-283}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-1}{\frac{\frac{a - z}{y - z}}{x - t}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -5.0000000000000001e-283Initial program 71.9%
+-commutative71.9%
*-commutative71.9%
associate-/l*89.2%
fma-define89.2%
Simplified89.2%
if -5.0000000000000001e-283 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.2%
associate-/l*3.4%
Simplified3.4%
associate-*r/4.2%
clear-num4.6%
associate-/r*4.5%
Applied egg-rr4.5%
Taylor expanded in z around -inf 99.7%
mul-1-neg99.7%
distribute-rgt-out--99.7%
associate-/l*99.8%
Simplified99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 78.6%
associate-/l*87.3%
Simplified87.3%
associate-*r/78.6%
clear-num78.6%
associate-/r*90.8%
Applied egg-rr90.8%
Final simplification90.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -5e-283) (not (<= t_1 0.0)))
(+ x (/ -1.0 (/ (/ (- a z) (- y z)) (- x t))))
(+ 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-283) || !(t_1 <= 0.0)) {
tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t)));
} 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-283)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((-1.0d0) / (((a - z) / (y - z)) / (x - t)))
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-283) || !(t_1 <= 0.0)) {
tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t)));
} 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-283) or not (t_1 <= 0.0): tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t))) 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-283) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(a - z) / Float64(y - z)) / Float64(x - t)))); else tmp = Float64(t + Float64(Float64(t - x) * Float64(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-283) || ~((t_1 <= 0.0))) tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t))); 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-283], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(-1.0 / N[(N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $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^{-283} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{-1}{\frac{\frac{a - z}{y - z}}{x - t}}\\
\mathbf{else}:\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -5.0000000000000001e-283 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 75.6%
associate-/l*86.7%
Simplified86.7%
associate-*r/75.6%
clear-num75.5%
associate-/r*90.0%
Applied egg-rr90.0%
if -5.0000000000000001e-283 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.2%
associate-/l*3.4%
Simplified3.4%
associate-*r/4.2%
clear-num4.6%
associate-/r*4.5%
Applied egg-rr4.5%
Taylor expanded in z around -inf 99.7%
mul-1-neg99.7%
distribute-rgt-out--99.7%
associate-/l*99.8%
Simplified99.8%
Final simplification90.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.16e+76) (not (<= z 2.1e+69))) (+ t (* (- t x) (/ (- a y) z))) (+ x (/ (- y z) (/ (- a z) (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.16e+76) || !(z <= 2.1e+69)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) / ((a - z) / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.16d+76)) .or. (.not. (z <= 2.1d+69))) then
tmp = t + ((t - x) * ((a - y) / z))
else
tmp = x + ((y - z) / ((a - z) / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.16e+76) || !(z <= 2.1e+69)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.16e+76) or not (z <= 2.1e+69): tmp = t + ((t - x) * ((a - y) / z)) else: tmp = x + ((y - z) / ((a - z) / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.16e+76) || !(z <= 2.1e+69)) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.16e+76) || ~((z <= 2.1e+69))) tmp = t + ((t - x) * ((a - y) / z)); else tmp = x + ((y - z) / ((a - z) / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.16e+76], N[Not[LessEqual[z, 2.1e+69]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{+76} \lor \neg \left(z \leq 2.1 \cdot 10^{+69}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if z < -1.1599999999999999e76 or 2.10000000000000015e69 < z Initial program 40.9%
associate-/l*60.4%
Simplified60.4%
associate-*r/40.9%
clear-num40.8%
associate-/r*67.3%
Applied egg-rr67.3%
Taylor expanded in z around -inf 68.5%
mul-1-neg68.5%
distribute-rgt-out--68.6%
associate-/l*83.1%
Simplified83.1%
if -1.1599999999999999e76 < z < 2.10000000000000015e69Initial program 87.0%
associate-/l*92.2%
Simplified92.2%
clear-num92.1%
un-div-inv92.3%
Applied egg-rr92.3%
Final simplification89.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.15e+75) (not (<= z 2.3e+69))) (+ t (* (- t x) (/ (- a y) z))) (+ x (* (- y z) (/ (- t x) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.15e+75) || !(z <= 2.3e+69)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) * ((t - x) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.15d+75)) .or. (.not. (z <= 2.3d+69))) then
tmp = t + ((t - x) * ((a - y) / z))
else
tmp = x + ((y - z) * ((t - x) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.15e+75) || !(z <= 2.3e+69)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) * ((t - x) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.15e+75) or not (z <= 2.3e+69): tmp = t + ((t - x) * ((a - y) / z)) else: tmp = x + ((y - z) * ((t - x) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.15e+75) || !(z <= 2.3e+69)) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.15e+75) || ~((z <= 2.3e+69))) tmp = t + ((t - x) * ((a - y) / z)); else tmp = x + ((y - z) * ((t - x) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.15e+75], N[Not[LessEqual[z, 2.3e+69]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+75} \lor \neg \left(z \leq 2.3 \cdot 10^{+69}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\end{array}
\end{array}
if z < -1.1499999999999999e75 or 2.30000000000000017e69 < z Initial program 40.9%
associate-/l*60.4%
Simplified60.4%
associate-*r/40.9%
clear-num40.8%
associate-/r*67.3%
Applied egg-rr67.3%
Taylor expanded in z around -inf 68.5%
mul-1-neg68.5%
distribute-rgt-out--68.6%
associate-/l*83.1%
Simplified83.1%
if -1.1499999999999999e75 < z < 2.30000000000000017e69Initial program 87.0%
associate-/l*92.2%
Simplified92.2%
Final simplification89.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3e-91) (not (<= z 1.38e+28))) (+ t (* (- t x) (/ (- a y) z))) (+ x (/ (- y z) (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3e-91) || !(z <= 1.38e+28)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3d-91)) .or. (.not. (z <= 1.38d+28))) then
tmp = t + ((t - x) * ((a - y) / z))
else
tmp = x + ((y - z) / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3e-91) || !(z <= 1.38e+28)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3e-91) or not (z <= 1.38e+28): tmp = t + ((t - x) * ((a - y) / z)) else: tmp = x + ((y - z) / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3e-91) || !(z <= 1.38e+28)) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3e-91) || ~((z <= 1.38e+28))) tmp = t + ((t - x) * ((a - y) / z)); else tmp = x + ((y - z) / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3e-91], N[Not[LessEqual[z, 1.38e+28]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-91} \lor \neg \left(z \leq 1.38 \cdot 10^{+28}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -3.0000000000000002e-91 or 1.38000000000000003e28 < z Initial program 53.5%
associate-/l*68.5%
Simplified68.5%
associate-*r/53.5%
clear-num53.4%
associate-/r*74.1%
Applied egg-rr74.1%
Taylor expanded in z around -inf 65.2%
mul-1-neg65.2%
distribute-rgt-out--66.0%
associate-/l*76.9%
Simplified76.9%
if -3.0000000000000002e-91 < z < 1.38000000000000003e28Initial program 88.2%
associate-/l*93.7%
Simplified93.7%
clear-num93.6%
un-div-inv93.8%
Applied egg-rr93.8%
Taylor expanded in a around inf 82.9%
Final simplification79.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.4e-40) (not (<= a 1.05e-71))) (+ x (/ (- y z) (/ a (- t x)))) (+ t (/ (* (- t x) (- a y)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.4e-40) || !(a <= 1.05e-71)) {
tmp = x + ((y - z) / (a / (t - x)));
} 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 ((a <= (-6.4d-40)) .or. (.not. (a <= 1.05d-71))) then
tmp = x + ((y - z) / (a / (t - x)))
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 ((a <= -6.4e-40) || !(a <= 1.05e-71)) {
tmp = x + ((y - z) / (a / (t - x)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6.4e-40) or not (a <= 1.05e-71): tmp = x + ((y - z) / (a / (t - x))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6.4e-40) || !(a <= 1.05e-71)) tmp = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x)))); 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 ((a <= -6.4e-40) || ~((a <= 1.05e-71))) tmp = x + ((y - z) / (a / (t - x))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.4e-40], N[Not[LessEqual[a, 1.05e-71]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $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}\;a \leq -6.4 \cdot 10^{-40} \lor \neg \left(a \leq 1.05 \cdot 10^{-71}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if a < -6.40000000000000004e-40 or 1.0500000000000001e-71 < a Initial program 70.7%
associate-/l*84.4%
Simplified84.4%
clear-num83.7%
un-div-inv83.8%
Applied egg-rr83.8%
Taylor expanded in a around inf 73.2%
if -6.40000000000000004e-40 < a < 1.0500000000000001e-71Initial program 70.4%
associate-/l*75.2%
Simplified75.2%
Taylor expanded in z around inf 78.3%
associate--l+78.3%
associate-*r/78.3%
associate-*r/78.3%
mul-1-neg78.3%
div-sub78.3%
mul-1-neg78.3%
distribute-lft-out--78.3%
associate-*r/78.3%
mul-1-neg78.3%
unsub-neg78.3%
distribute-rgt-out--78.3%
Simplified78.3%
Final simplification75.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.08e-106) (not (<= z 0.0295))) (* t (/ (- y z) (- a z))) (+ x (/ (- y z) (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.08e-106) || !(z <= 0.0295)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((y - z) / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.08d-106)) .or. (.not. (z <= 0.0295d0))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((y - z) / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.08e-106) || !(z <= 0.0295)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((y - z) / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.08e-106) or not (z <= 0.0295): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((y - z) / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.08e-106) || !(z <= 0.0295)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.08e-106) || ~((z <= 0.0295))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((y - z) / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.08e-106], N[Not[LessEqual[z, 0.0295]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.08 \cdot 10^{-106} \lor \neg \left(z \leq 0.0295\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -2.0800000000000001e-106 or 0.029499999999999998 < z Initial program 54.1%
associate-/l*68.9%
Simplified68.9%
Taylor expanded in x around 0 50.0%
associate-/l*67.0%
Simplified67.0%
if -2.0800000000000001e-106 < z < 0.029499999999999998Initial program 89.9%
associate-/l*94.9%
Simplified94.9%
clear-num94.8%
un-div-inv95.0%
Applied egg-rr95.0%
Taylor expanded in a around inf 83.4%
Final simplification74.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.08e-106) (not (<= z 0.124))) (* t (/ (- y z) (- a z))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.08e-106) || !(z <= 0.124)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.08d-106)) .or. (.not. (z <= 0.124d0))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.08e-106) || !(z <= 0.124)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.08e-106) or not (z <= 0.124): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.08e-106) || !(z <= 0.124)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.08e-106) || ~((z <= 0.124))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.08e-106], N[Not[LessEqual[z, 0.124]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.08 \cdot 10^{-106} \lor \neg \left(z \leq 0.124\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -2.0800000000000001e-106 or 0.124 < z Initial program 54.1%
associate-/l*68.9%
Simplified68.9%
Taylor expanded in x around 0 50.0%
associate-/l*67.0%
Simplified67.0%
if -2.0800000000000001e-106 < z < 0.124Initial program 89.9%
associate-/l*94.9%
Simplified94.9%
clear-num94.8%
un-div-inv95.0%
Applied egg-rr95.0%
Taylor expanded in a around inf 83.4%
Taylor expanded in y around inf 81.3%
Final simplification73.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.4e-106) (not (<= z 0.057))) (* 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 <= -1.4e-106) || !(z <= 0.057)) {
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 <= (-1.4d-106)) .or. (.not. (z <= 0.057d0))) 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 <= -1.4e-106) || !(z <= 0.057)) {
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 <= -1.4e-106) or not (z <= 0.057): 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 <= -1.4e-106) || !(z <= 0.057)) 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 <= -1.4e-106) || ~((z <= 0.057))) 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, -1.4e-106], N[Not[LessEqual[z, 0.057]], $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 -1.4 \cdot 10^{-106} \lor \neg \left(z \leq 0.057\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -1.39999999999999994e-106 or 0.0570000000000000021 < z Initial program 54.1%
associate-/l*68.9%
Simplified68.9%
Taylor expanded in x around 0 50.0%
associate-/l*67.0%
Simplified67.0%
if -1.39999999999999994e-106 < z < 0.0570000000000000021Initial program 89.9%
associate-/l*94.9%
Simplified94.9%
Taylor expanded in z around 0 75.9%
associate-/l*81.2%
Simplified81.2%
Final simplification73.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -5.8e+168) (not (<= x 7.5e+26))) (* x (- 1.0 (/ y a))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5.8e+168) || !(x <= 7.5e+26)) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-5.8d+168)) .or. (.not. (x <= 7.5d+26))) then
tmp = x * (1.0d0 - (y / a))
else
tmp = t * ((y - z) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5.8e+168) || !(x <= 7.5e+26)) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -5.8e+168) or not (x <= 7.5e+26): tmp = x * (1.0 - (y / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -5.8e+168) || !(x <= 7.5e+26)) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -5.8e+168) || ~((x <= 7.5e+26))) tmp = x * (1.0 - (y / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -5.8e+168], N[Not[LessEqual[x, 7.5e+26]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{+168} \lor \neg \left(x \leq 7.5 \cdot 10^{+26}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -5.8e168 or 7.49999999999999941e26 < x Initial program 62.3%
associate-/l*76.3%
Simplified76.3%
Taylor expanded in z around 0 52.8%
associate-/l*60.1%
Simplified60.1%
Taylor expanded in t around 0 59.1%
associate-*r/59.1%
mul-1-neg59.1%
Simplified59.1%
Taylor expanded in x around 0 60.3%
mul-1-neg60.3%
unsub-neg60.3%
Simplified60.3%
if -5.8e168 < x < 7.49999999999999941e26Initial program 75.0%
associate-/l*83.3%
Simplified83.3%
Taylor expanded in x around 0 59.7%
associate-/l*72.0%
Simplified72.0%
Final simplification68.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.5e-89) (not (<= z 2.4e+30))) (- t (* t (/ y z))) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e-89) || !(z <= 2.4e+30)) {
tmp = t - (t * (y / z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.5d-89)) .or. (.not. (z <= 2.4d+30))) then
tmp = t - (t * (y / z))
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e-89) || !(z <= 2.4e+30)) {
tmp = t - (t * (y / z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.5e-89) or not (z <= 2.4e+30): tmp = t - (t * (y / z)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.5e-89) || !(z <= 2.4e+30)) tmp = Float64(t - Float64(t * Float64(y / z))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.5e-89) || ~((z <= 2.4e+30))) tmp = t - (t * (y / z)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.5e-89], N[Not[LessEqual[z, 2.4e+30]], $MachinePrecision]], N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-89} \lor \neg \left(z \leq 2.4 \cdot 10^{+30}\right):\\
\;\;\;\;t - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -4.4999999999999999e-89 or 2.3999999999999999e30 < z Initial program 53.9%
associate-/l*69.0%
Simplified69.0%
Taylor expanded in z around inf 64.2%
associate--l+64.2%
associate-*r/64.2%
associate-*r/64.2%
mul-1-neg64.2%
div-sub65.0%
mul-1-neg65.0%
distribute-lft-out--65.0%
associate-*r/65.0%
mul-1-neg65.0%
unsub-neg65.0%
distribute-rgt-out--65.8%
Simplified65.8%
Taylor expanded in y around inf 60.8%
Taylor expanded in t around inf 48.1%
associate-/l*53.2%
Simplified53.2%
if -4.4999999999999999e-89 < z < 2.3999999999999999e30Initial program 87.6%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in z around 0 73.0%
associate-/l*78.7%
Simplified78.7%
Taylor expanded in t around inf 56.3%
associate-/l*60.8%
Simplified60.8%
Final simplification56.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.5e-89) (- t (* t (/ y z))) (if (<= z 9.5e+23) (+ x (* t (/ y a))) (+ t (/ (* x y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.5e-89) {
tmp = t - (t * (y / z));
} else if (z <= 9.5e+23) {
tmp = x + (t * (y / a));
} else {
tmp = t + ((x * 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 <= (-4.5d-89)) then
tmp = t - (t * (y / z))
else if (z <= 9.5d+23) then
tmp = x + (t * (y / a))
else
tmp = t + ((x * 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 <= -4.5e-89) {
tmp = t - (t * (y / z));
} else if (z <= 9.5e+23) {
tmp = x + (t * (y / a));
} else {
tmp = t + ((x * y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.5e-89: tmp = t - (t * (y / z)) elif z <= 9.5e+23: tmp = x + (t * (y / a)) else: tmp = t + ((x * y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.5e-89) tmp = Float64(t - Float64(t * Float64(y / z))); elseif (z <= 9.5e+23) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t + Float64(Float64(x * y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.5e-89) tmp = t - (t * (y / z)); elseif (z <= 9.5e+23) tmp = x + (t * (y / a)); else tmp = t + ((x * y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.5e-89], N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+23], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-89}:\\
\;\;\;\;t - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+23}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\
\end{array}
\end{array}
if z < -4.4999999999999999e-89Initial program 51.3%
associate-/l*68.7%
Simplified68.7%
Taylor expanded in z around inf 62.0%
associate--l+62.0%
associate-*r/62.0%
associate-*r/62.0%
mul-1-neg62.0%
div-sub63.2%
mul-1-neg63.2%
distribute-lft-out--63.2%
associate-*r/63.2%
mul-1-neg63.2%
unsub-neg63.2%
distribute-rgt-out--64.5%
Simplified64.5%
Taylor expanded in y around inf 58.5%
Taylor expanded in t around inf 47.3%
associate-/l*51.8%
Simplified51.8%
if -4.4999999999999999e-89 < z < 9.50000000000000038e23Initial program 88.1%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in z around 0 74.1%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in t around inf 57.1%
associate-/l*61.7%
Simplified61.7%
if 9.50000000000000038e23 < z Initial program 58.0%
associate-/l*68.8%
Simplified68.8%
Taylor expanded in z around inf 67.2%
associate--l+67.2%
associate-*r/67.2%
associate-*r/67.2%
mul-1-neg67.2%
div-sub67.2%
mul-1-neg67.2%
distribute-lft-out--67.2%
associate-*r/67.2%
mul-1-neg67.2%
unsub-neg67.2%
distribute-rgt-out--67.2%
Simplified67.2%
Taylor expanded in y around inf 64.0%
Taylor expanded in t around 0 62.0%
neg-mul-162.0%
Simplified62.0%
Final simplification58.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.3e-89) (- t (* t (/ y z))) (if (<= z 2.15e+27) (+ x (* t (/ y a))) (* t (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.3e-89) {
tmp = t - (t * (y / z));
} else if (z <= 2.15e+27) {
tmp = x + (t * (y / a));
} else {
tmp = t * (z / (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 (z <= (-1.3d-89)) then
tmp = t - (t * (y / z))
else if (z <= 2.15d+27) then
tmp = x + (t * (y / a))
else
tmp = t * (z / (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 (z <= -1.3e-89) {
tmp = t - (t * (y / z));
} else if (z <= 2.15e+27) {
tmp = x + (t * (y / a));
} else {
tmp = t * (z / (z - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.3e-89: tmp = t - (t * (y / z)) elif z <= 2.15e+27: tmp = x + (t * (y / a)) else: tmp = t * (z / (z - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.3e-89) tmp = Float64(t - Float64(t * Float64(y / z))); elseif (z <= 2.15e+27) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t * Float64(z / Float64(z - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.3e-89) tmp = t - (t * (y / z)); elseif (z <= 2.15e+27) tmp = x + (t * (y / a)); else tmp = t * (z / (z - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.3e-89], N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+27], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-89}:\\
\;\;\;\;t - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+27}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -1.2999999999999999e-89Initial program 51.3%
associate-/l*68.7%
Simplified68.7%
Taylor expanded in z around inf 62.0%
associate--l+62.0%
associate-*r/62.0%
associate-*r/62.0%
mul-1-neg62.0%
div-sub63.2%
mul-1-neg63.2%
distribute-lft-out--63.2%
associate-*r/63.2%
mul-1-neg63.2%
unsub-neg63.2%
distribute-rgt-out--64.5%
Simplified64.5%
Taylor expanded in y around inf 58.5%
Taylor expanded in t around inf 47.3%
associate-/l*51.8%
Simplified51.8%
if -1.2999999999999999e-89 < z < 2.15000000000000004e27Initial program 88.1%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in z around 0 74.1%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in t around inf 57.1%
associate-/l*61.7%
Simplified61.7%
if 2.15000000000000004e27 < z Initial program 58.0%
associate-/l*68.8%
Simplified68.8%
Taylor expanded in y around 0 36.4%
mul-1-neg36.4%
unsub-neg36.4%
associate-/l*39.5%
Simplified39.5%
Taylor expanded in x around 0 41.6%
mul-1-neg41.6%
associate-/l*54.6%
distribute-rgt-neg-in54.6%
mul-1-neg54.6%
associate-*r/54.6%
neg-mul-154.6%
Simplified54.6%
Final simplification57.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.5e+84) t (if (<= z 1.45e+30) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+84) {
tmp = t;
} else if (z <= 1.45e+30) {
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 <= (-9.5d+84)) then
tmp = t
else if (z <= 1.45d+30) 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 <= -9.5e+84) {
tmp = t;
} else if (z <= 1.45e+30) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e+84: tmp = t elif z <= 1.45e+30: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e+84) tmp = t; elseif (z <= 1.45e+30) 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 <= -9.5e+84) tmp = t; elseif (z <= 1.45e+30) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+84], t, If[LessEqual[z, 1.45e+30], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+84}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+30}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.49999999999999979e84 or 1.4499999999999999e30 < z Initial program 44.8%
associate-/l*64.5%
Simplified64.5%
Taylor expanded in z around inf 47.5%
if -9.49999999999999979e84 < z < 1.4499999999999999e30Initial program 86.9%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in z around 0 67.0%
associate-/l*71.0%
Simplified71.0%
Taylor expanded in t around inf 51.8%
associate-/l*55.4%
Simplified55.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.5e+85) t (if (<= z 2e+30) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.5e+85) {
tmp = t;
} else if (z <= 2e+30) {
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 <= (-7.5d+85)) then
tmp = t
else if (z <= 2d+30) 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 <= -7.5e+85) {
tmp = t;
} else if (z <= 2e+30) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.5e+85: tmp = t elif z <= 2e+30: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.5e+85) tmp = t; elseif (z <= 2e+30) 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 <= -7.5e+85) tmp = t; elseif (z <= 2e+30) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.5e+85], t, If[LessEqual[z, 2e+30], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+85}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -7.49999999999999942e85 or 2e30 < z Initial program 44.2%
associate-/l*64.1%
Simplified64.1%
Taylor expanded in z around inf 48.0%
if -7.49999999999999942e85 < z < 2e30Initial program 87.0%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in z around 0 66.6%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in t around 0 49.8%
associate-*r/49.8%
mul-1-neg49.8%
Simplified49.8%
Taylor expanded in x around 0 52.5%
mul-1-neg52.5%
unsub-neg52.5%
Simplified52.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -5e+85) t (if (<= z -3.05e-108) (* (/ y z) (- t)) (if (<= z 0.00285) x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e+85) {
tmp = t;
} else if (z <= -3.05e-108) {
tmp = (y / z) * -t;
} else if (z <= 0.00285) {
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 <= (-5d+85)) then
tmp = t
else if (z <= (-3.05d-108)) then
tmp = (y / z) * -t
else if (z <= 0.00285d0) 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 <= -5e+85) {
tmp = t;
} else if (z <= -3.05e-108) {
tmp = (y / z) * -t;
} else if (z <= 0.00285) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e+85: tmp = t elif z <= -3.05e-108: tmp = (y / z) * -t elif z <= 0.00285: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e+85) tmp = t; elseif (z <= -3.05e-108) tmp = Float64(Float64(y / z) * Float64(-t)); elseif (z <= 0.00285) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e+85) tmp = t; elseif (z <= -3.05e-108) tmp = (y / z) * -t; elseif (z <= 0.00285) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e+85], t, If[LessEqual[z, -3.05e-108], N[(N[(y / z), $MachinePrecision] * (-t)), $MachinePrecision], If[LessEqual[z, 0.00285], x, t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+85}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3.05 \cdot 10^{-108}:\\
\;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\
\mathbf{elif}\;z \leq 0.00285:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.0000000000000001e85 or 0.0028500000000000001 < z Initial program 45.8%
associate-/l*64.8%
Simplified64.8%
Taylor expanded in z around inf 44.8%
if -5.0000000000000001e85 < z < -3.05000000000000004e-108Initial program 85.1%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in z around inf 54.4%
associate--l+54.4%
associate-*r/54.4%
associate-*r/54.4%
mul-1-neg54.4%
div-sub57.5%
mul-1-neg57.5%
distribute-lft-out--57.5%
associate-*r/57.5%
mul-1-neg57.5%
unsub-neg57.5%
distribute-rgt-out--60.7%
Simplified60.7%
Taylor expanded in y around inf 54.7%
Taylor expanded in t around inf 39.6%
associate-/l*42.4%
Simplified42.4%
Taylor expanded in y around inf 32.9%
mul-1-neg32.9%
associate-*r/35.7%
distribute-rgt-neg-in35.7%
distribute-neg-frac35.7%
Simplified35.7%
if -3.05000000000000004e-108 < z < 0.0028500000000000001Initial program 89.7%
associate-/l*94.8%
Simplified94.8%
Taylor expanded in a around inf 37.8%
Final simplification40.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.1e+62) t (if (<= z 6.6e-5) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.1e+62) {
tmp = t;
} else if (z <= 6.6e-5) {
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 <= (-3.1d+62)) then
tmp = t
else if (z <= 6.6d-5) 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 <= -3.1e+62) {
tmp = t;
} else if (z <= 6.6e-5) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.1e+62: tmp = t elif z <= 6.6e-5: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.1e+62) tmp = t; elseif (z <= 6.6e-5) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.1e+62) tmp = t; elseif (z <= 6.6e-5) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.1e+62], t, If[LessEqual[z, 6.6e-5], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+62}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.10000000000000014e62 or 6.6000000000000005e-5 < z Initial program 47.0%
associate-/l*65.8%
Simplified65.8%
Taylor expanded in z around inf 42.6%
if -3.10000000000000014e62 < z < 6.6000000000000005e-5Initial program 89.6%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in a around inf 33.6%
(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 70.6%
associate-/l*80.9%
Simplified80.9%
Taylor expanded in z around inf 22.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 2024137
(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))))