
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (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) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (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) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= (+ x (/ (* (- y z) t) (- a z))) -4000000000.0) (+ x (/ (- y z) (/ (- a z) t))) (+ x (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x + (((y - z) * t) / (a - z))) <= -4000000000.0) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = x + (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 + (((y - z) * t) / (a - z))) <= (-4000000000.0d0)) then
tmp = x + ((y - z) / ((a - z) / t))
else
tmp = x + (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 + (((y - z) * t) / (a - z))) <= -4000000000.0) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x + (((y - z) * t) / (a - z))) <= -4000000000.0: tmp = x + ((y - z) / ((a - z) / t)) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) <= -4000000000.0) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); else tmp = Float64(x + 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 + (((y - z) * t) / (a - z))) <= -4000000000.0) tmp = x + ((y - z) / ((a - z) / t)); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4000000000.0], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + \frac{\left(y - z\right) \cdot t}{a - z} \leq -4000000000:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))) < -4e9Initial program 86.8%
associate-/l*99.9%
Simplified99.9%
if -4e9 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))) Initial program 88.3%
associate-*l/99.3%
Simplified99.3%
Final simplification99.5%
(FPCore (x y z t a) :precision binary64 (if (<= (+ x (/ (* (- y z) t) (- a z))) -4000000000.0) (+ x (* (- y z) (/ t (- a z)))) (+ x (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x + (((y - z) * t) / (a - z))) <= -4000000000.0) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = x + (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 + (((y - z) * t) / (a - z))) <= (-4000000000.0d0)) then
tmp = x + ((y - z) * (t / (a - z)))
else
tmp = x + (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 + (((y - z) * t) / (a - z))) <= -4000000000.0) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x + (((y - z) * t) / (a - z))) <= -4000000000.0: tmp = x + ((y - z) * (t / (a - z))) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) <= -4000000000.0) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); else tmp = Float64(x + 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 + (((y - z) * t) / (a - z))) <= -4000000000.0) tmp = x + ((y - z) * (t / (a - z))); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4000000000.0], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + \frac{\left(y - z\right) \cdot t}{a - z} \leq -4000000000:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))) < -4e9Initial program 86.8%
associate-/l*99.9%
clear-num99.8%
associate-/r/99.9%
clear-num99.9%
Applied egg-rr99.9%
if -4e9 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))) Initial program 88.3%
associate-*l/99.3%
Simplified99.3%
Final simplification99.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.05e+86)
(+ x t)
(if (<= z -1.25e-69)
(- x (* t (/ y z)))
(if (or (<= z -2.2e-78) (not (<= z 1.05e+63)))
(+ x t)
(+ x (* (- y z) (/ t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.05e+86) {
tmp = x + t;
} else if (z <= -1.25e-69) {
tmp = x - (t * (y / z));
} else if ((z <= -2.2e-78) || !(z <= 1.05e+63)) {
tmp = x + t;
} else {
tmp = x + ((y - z) * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.05d+86)) then
tmp = x + t
else if (z <= (-1.25d-69)) then
tmp = x - (t * (y / z))
else if ((z <= (-2.2d-78)) .or. (.not. (z <= 1.05d+63))) then
tmp = x + t
else
tmp = x + ((y - z) * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.05e+86) {
tmp = x + t;
} else if (z <= -1.25e-69) {
tmp = x - (t * (y / z));
} else if ((z <= -2.2e-78) || !(z <= 1.05e+63)) {
tmp = x + t;
} else {
tmp = x + ((y - z) * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.05e+86: tmp = x + t elif z <= -1.25e-69: tmp = x - (t * (y / z)) elif (z <= -2.2e-78) or not (z <= 1.05e+63): tmp = x + t else: tmp = x + ((y - z) * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.05e+86) tmp = Float64(x + t); elseif (z <= -1.25e-69) tmp = Float64(x - Float64(t * Float64(y / z))); elseif ((z <= -2.2e-78) || !(z <= 1.05e+63)) tmp = Float64(x + t); else tmp = Float64(x + Float64(Float64(y - z) * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.05e+86) tmp = x + t; elseif (z <= -1.25e-69) tmp = x - (t * (y / z)); elseif ((z <= -2.2e-78) || ~((z <= 1.05e+63))) tmp = x + t; else tmp = x + ((y - z) * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.05e+86], N[(x + t), $MachinePrecision], If[LessEqual[z, -1.25e-69], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -2.2e-78], N[Not[LessEqual[z, 1.05e+63]], $MachinePrecision]], N[(x + t), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+86}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-69}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-78} \lor \neg \left(z \leq 1.05 \cdot 10^{+63}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.0499999999999999e86 or -1.25000000000000008e-69 < z < -2.1999999999999999e-78 or 1.0500000000000001e63 < z Initial program 74.4%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 81.7%
if -1.0499999999999999e86 < z < -1.25000000000000008e-69Initial program 99.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 81.6%
Taylor expanded in a around 0 81.6%
mul-1-neg81.6%
unsub-neg81.6%
associate-*r/81.7%
Simplified81.7%
if -2.1999999999999999e-78 < z < 1.0500000000000001e63Initial program 96.3%
associate-*l/94.8%
Simplified94.8%
Taylor expanded in a around inf 81.2%
associate-/l*81.1%
associate-/r/81.7%
Simplified81.7%
Final simplification81.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -7.6e+88)
(+ x t)
(if (<= z -1.7e-61)
(- x (* t (/ y z)))
(if (<= z 1.6e+64) (+ x (/ t (/ a y))) (+ x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.6e+88) {
tmp = x + t;
} else if (z <= -1.7e-61) {
tmp = x - (t * (y / z));
} else if (z <= 1.6e+64) {
tmp = x + (t / (a / y));
} else {
tmp = 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 <= (-7.6d+88)) then
tmp = x + t
else if (z <= (-1.7d-61)) then
tmp = x - (t * (y / z))
else if (z <= 1.6d+64) then
tmp = x + (t / (a / y))
else
tmp = 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 <= -7.6e+88) {
tmp = x + t;
} else if (z <= -1.7e-61) {
tmp = x - (t * (y / z));
} else if (z <= 1.6e+64) {
tmp = x + (t / (a / y));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.6e+88: tmp = x + t elif z <= -1.7e-61: tmp = x - (t * (y / z)) elif z <= 1.6e+64: tmp = x + (t / (a / y)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.6e+88) tmp = Float64(x + t); elseif (z <= -1.7e-61) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 1.6e+64) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.6e+88) tmp = x + t; elseif (z <= -1.7e-61) tmp = x - (t * (y / z)); elseif (z <= 1.6e+64) tmp = x + (t / (a / y)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.6e+88], N[(x + t), $MachinePrecision], If[LessEqual[z, -1.7e-61], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+64], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{+88}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-61}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -7.5999999999999993e88 or 1.60000000000000009e64 < z Initial program 73.4%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 82.7%
if -7.5999999999999993e88 < z < -1.6999999999999999e-61Initial program 99.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 81.6%
Taylor expanded in a around 0 81.6%
mul-1-neg81.6%
unsub-neg81.6%
associate-*r/81.7%
Simplified81.7%
if -1.6999999999999999e-61 < z < 1.60000000000000009e64Initial program 96.4%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in z around 0 78.7%
associate-/l*79.3%
Simplified79.3%
Final simplification80.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.7e+85) (not (<= z 9.5e+86))) (+ x t) (+ x (* y (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.7e+85) || !(z <= 9.5e+86)) {
tmp = x + t;
} else {
tmp = x + (y * (t / (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.7d+85)) .or. (.not. (z <= 9.5d+86))) then
tmp = x + t
else
tmp = x + (y * (t / (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.7e+85) || !(z <= 9.5e+86)) {
tmp = x + t;
} else {
tmp = x + (y * (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.7e+85) or not (z <= 9.5e+86): tmp = x + t else: tmp = x + (y * (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.7e+85) || !(z <= 9.5e+86)) tmp = Float64(x + t); else tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.7e+85) || ~((z <= 9.5e+86))) tmp = x + t; else tmp = x + (y * (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.7e+85], N[Not[LessEqual[z, 9.5e+86]], $MachinePrecision]], N[(x + t), $MachinePrecision], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+85} \lor \neg \left(z \leq 9.5 \cdot 10^{+86}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if z < -1.7000000000000002e85 or 9.50000000000000028e86 < z Initial program 70.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 86.8%
if -1.7000000000000002e85 < z < 9.50000000000000028e86Initial program 97.0%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in y around inf 85.9%
*-commutative85.9%
clear-num85.9%
un-div-inv86.4%
Applied egg-rr86.4%
associate-/r/87.2%
Applied egg-rr87.2%
Final simplification87.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -0.00098) (not (<= z 4e+64))) (- x (* t (+ (/ y z) -1.0))) (+ x (* y (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.00098) || !(z <= 4e+64)) {
tmp = x - (t * ((y / z) + -1.0));
} else {
tmp = x + (y * (t / (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 <= (-0.00098d0)) .or. (.not. (z <= 4d+64))) then
tmp = x - (t * ((y / z) + (-1.0d0)))
else
tmp = x + (y * (t / (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 <= -0.00098) || !(z <= 4e+64)) {
tmp = x - (t * ((y / z) + -1.0));
} else {
tmp = x + (y * (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -0.00098) or not (z <= 4e+64): tmp = x - (t * ((y / z) + -1.0)) else: tmp = x + (y * (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -0.00098) || !(z <= 4e+64)) tmp = Float64(x - Float64(t * Float64(Float64(y / z) + -1.0))); else tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -0.00098) || ~((z <= 4e+64))) tmp = x - (t * ((y / z) + -1.0)); else tmp = x + (y * (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -0.00098], N[Not[LessEqual[z, 4e+64]], $MachinePrecision]], N[(x - N[(t * N[(N[(y / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00098 \lor \neg \left(z \leq 4 \cdot 10^{+64}\right):\\
\;\;\;\;x - t \cdot \left(\frac{y}{z} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if z < -9.7999999999999997e-4 or 4.00000000000000009e64 < z Initial program 77.1%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around 0 89.0%
mul-1-neg89.0%
div-sub89.0%
sub-neg89.0%
*-inverses89.0%
metadata-eval89.0%
Simplified89.0%
add-sqr-sqrt76.8%
sqrt-unprod79.6%
sqr-neg79.6%
sqrt-unprod5.3%
add-sqr-sqrt45.7%
cancel-sign-sub45.7%
*-commutative45.7%
add-sqr-sqrt40.4%
sqrt-unprod49.2%
sqr-neg49.2%
sqrt-unprod12.1%
add-sqr-sqrt89.0%
Applied egg-rr89.0%
if -9.7999999999999997e-4 < z < 4.00000000000000009e64Initial program 96.6%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in y around inf 89.6%
*-commutative89.6%
clear-num89.6%
un-div-inv90.2%
Applied egg-rr90.2%
associate-/r/91.1%
Applied egg-rr91.1%
Final simplification90.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.15e-78) (not (<= z 3e+64))) (+ x t) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.15e-78) || !(z <= 3e+64)) {
tmp = x + t;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.15d-78)) .or. (.not. (z <= 3d+64))) then
tmp = x + t
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.15e-78) || !(z <= 3e+64)) {
tmp = x + t;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.15e-78) or not (z <= 3e+64): tmp = x + t else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.15e-78) || !(z <= 3e+64)) tmp = Float64(x + t); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.15e-78) || ~((z <= 3e+64))) tmp = x + t; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.15e-78], N[Not[LessEqual[z, 3e+64]], $MachinePrecision]], N[(x + t), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{-78} \lor \neg \left(z \leq 3 \cdot 10^{+64}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -2.14999999999999997e-78 or 3.0000000000000002e64 < z Initial program 78.4%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 78.4%
if -2.14999999999999997e-78 < z < 3.0000000000000002e64Initial program 96.4%
associate-*l/94.9%
Simplified94.9%
Taylor expanded in z around 0 79.1%
associate-/l*79.7%
associate-/r/79.7%
Simplified79.7%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.3e-78) (not (<= z 2.55e+64))) (+ x t) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.3e-78) || !(z <= 2.55e+64)) {
tmp = x + t;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.3d-78)) .or. (.not. (z <= 2.55d+64))) then
tmp = x + t
else
tmp = x + (t / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.3e-78) || !(z <= 2.55e+64)) {
tmp = x + t;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.3e-78) or not (z <= 2.55e+64): tmp = x + t else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.3e-78) || !(z <= 2.55e+64)) tmp = Float64(x + t); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.3e-78) || ~((z <= 2.55e+64))) tmp = x + t; else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.3e-78], N[Not[LessEqual[z, 2.55e+64]], $MachinePrecision]], N[(x + t), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-78} \lor \neg \left(z \leq 2.55 \cdot 10^{+64}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -2.3000000000000002e-78 or 2.55000000000000012e64 < z Initial program 78.4%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 78.4%
if -2.3000000000000002e-78 < z < 2.55000000000000012e64Initial program 96.4%
associate-*l/94.9%
Simplified94.9%
Taylor expanded in z around 0 79.1%
associate-/l*79.7%
Simplified79.7%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ t (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * (t / (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 / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * (t / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * (t / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * (t / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t}{a - z}
\end{array}
Initial program 87.8%
associate-/l*96.2%
clear-num96.1%
associate-/r/95.8%
clear-num96.3%
Applied egg-rr96.3%
Final simplification96.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.9e+55) x (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e+55) {
tmp = x;
} else {
tmp = 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 (a <= (-2.9d+55)) then
tmp = x
else
tmp = 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 (a <= -2.9e+55) {
tmp = x;
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.9e+55: tmp = x else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.9e+55) tmp = x; else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.9e+55) tmp = x; else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.9e+55], x, N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+55}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if a < -2.8999999999999999e55Initial program 86.4%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around 0 80.0%
associate-/l*82.3%
Simplified82.3%
Taylor expanded in x around inf 69.2%
if -2.8999999999999999e55 < a Initial program 88.1%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in z around inf 62.8%
Final simplification63.9%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 87.8%
associate-*l/97.3%
Simplified97.3%
Taylor expanded in z around 0 62.1%
associate-/l*62.0%
Simplified62.0%
Taylor expanded in x around inf 51.5%
Final simplification51.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y z) (- a z)) t))))
(if (< t -1.0682974490174067e-39)
t_1
(if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- 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 (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (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 (t < (-1.0682974490174067d-39)) then
tmp = t_1
else if (t < 3.9110949887586375d-141) then
tmp = x + (((y - z) * t) / (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 (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (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 t < -1.0682974490174067e-39: tmp = t_1 elif t < 3.9110949887586375e-141: tmp = x + (((y - z) * t) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t)) tmp = 0.0 if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(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 (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = x + (((y - z) * t) / (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[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.0682974490174067e-39], t$95$1, If[Less[t, 3.9110949887586375e-141], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z} \cdot t\\
\mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023336
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))
(+ x (/ (* (- y z) t) (- a z))))