
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
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) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\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) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
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) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - 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 = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
Initial program 97.8%
clear-num97.7%
un-div-inv98.1%
Applied egg-rr98.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4e+128)
(+ x y)
(if (<= z -2.2e-68)
(- x (/ (* y t) z))
(if (<= z 9.8e-11) (+ x (* t (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+128) {
tmp = x + y;
} else if (z <= -2.2e-68) {
tmp = x - ((y * t) / z);
} else if (z <= 9.8e-11) {
tmp = x + (t * (y / a));
} else {
tmp = x + 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 <= (-4d+128)) then
tmp = x + y
else if (z <= (-2.2d-68)) then
tmp = x - ((y * t) / z)
else if (z <= 9.8d-11) then
tmp = x + (t * (y / a))
else
tmp = x + 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 <= -4e+128) {
tmp = x + y;
} else if (z <= -2.2e-68) {
tmp = x - ((y * t) / z);
} else if (z <= 9.8e-11) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4e+128: tmp = x + y elif z <= -2.2e-68: tmp = x - ((y * t) / z) elif z <= 9.8e-11: tmp = x + (t * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+128) tmp = Float64(x + y); elseif (z <= -2.2e-68) tmp = Float64(x - Float64(Float64(y * t) / z)); elseif (z <= 9.8e-11) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4e+128) tmp = x + y; elseif (z <= -2.2e-68) tmp = x - ((y * t) / z); elseif (z <= 9.8e-11) tmp = x + (t * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+128], N[(x + y), $MachinePrecision], If[LessEqual[z, -2.2e-68], N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.8e-11], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+128}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-68}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-11}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -4.0000000000000003e128 or 9.7999999999999998e-11 < z Initial program 99.9%
Taylor expanded in z around inf 80.8%
+-commutative80.8%
Simplified80.8%
if -4.0000000000000003e128 < z < -2.20000000000000002e-68Initial program 99.9%
Taylor expanded in t around inf 82.1%
mul-1-neg82.1%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in a around 0 71.4%
if -2.20000000000000002e-68 < z < 9.7999999999999998e-11Initial program 95.1%
Taylor expanded in z around 0 83.1%
+-commutative83.1%
associate-/l*87.1%
Simplified87.1%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.6e+128)
(+ x y)
(if (<= z -1.12e-66)
(- x (* t (/ y z)))
(if (<= z 1.5e-9) (+ x (* t (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.6e+128) {
tmp = x + y;
} else if (z <= -1.12e-66) {
tmp = x - (t * (y / z));
} else if (z <= 1.5e-9) {
tmp = x + (t * (y / a));
} else {
tmp = x + 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 <= (-4.6d+128)) then
tmp = x + y
else if (z <= (-1.12d-66)) then
tmp = x - (t * (y / z))
else if (z <= 1.5d-9) then
tmp = x + (t * (y / a))
else
tmp = x + 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 <= -4.6e+128) {
tmp = x + y;
} else if (z <= -1.12e-66) {
tmp = x - (t * (y / z));
} else if (z <= 1.5e-9) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.6e+128: tmp = x + y elif z <= -1.12e-66: tmp = x - (t * (y / z)) elif z <= 1.5e-9: tmp = x + (t * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.6e+128) tmp = Float64(x + y); elseif (z <= -1.12e-66) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 1.5e-9) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.6e+128) tmp = x + y; elseif (z <= -1.12e-66) tmp = x - (t * (y / z)); elseif (z <= 1.5e-9) tmp = x + (t * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.6e+128], N[(x + y), $MachinePrecision], If[LessEqual[z, -1.12e-66], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-9], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+128}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -1.12 \cdot 10^{-66}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-9}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -4.59999999999999996e128 or 1.49999999999999999e-9 < z Initial program 99.9%
Taylor expanded in z around inf 80.8%
+-commutative80.8%
Simplified80.8%
if -4.59999999999999996e128 < z < -1.12000000000000004e-66Initial program 99.9%
Taylor expanded in t around inf 82.1%
mul-1-neg82.1%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in z around inf 71.4%
mul-1-neg71.4%
sub-neg71.4%
associate-/l*71.3%
Simplified71.3%
if -1.12000000000000004e-66 < z < 1.49999999999999999e-9Initial program 95.1%
Taylor expanded in z around 0 83.1%
+-commutative83.1%
associate-/l*87.1%
Simplified87.1%
Final simplification82.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.5e+58) (not (<= z 1.05e-6))) (+ x (* y (/ (- z t) z))) (+ x (* t (/ y (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e+58) || !(z <= 1.05e-6)) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + (t * (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) :: tmp
if ((z <= (-4.5d+58)) .or. (.not. (z <= 1.05d-6))) then
tmp = x + (y * ((z - t) / z))
else
tmp = x + (t * (y / (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 <= -4.5e+58) || !(z <= 1.05e-6)) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.5e+58) or not (z <= 1.05e-6): tmp = x + (y * ((z - t) / z)) else: tmp = x + (t * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.5e+58) || !(z <= 1.05e-6)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); else tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.5e+58) || ~((z <= 1.05e-6))) tmp = x + (y * ((z - t) / z)); else tmp = x + (t * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.5e+58], N[Not[LessEqual[z, 1.05e-6]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+58} \lor \neg \left(z \leq 1.05 \cdot 10^{-6}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -4.4999999999999998e58 or 1.0499999999999999e-6 < z Initial program 99.9%
Taylor expanded in a around 0 86.9%
if -4.4999999999999998e58 < z < 1.0499999999999999e-6Initial program 96.0%
Taylor expanded in t around inf 91.0%
mul-1-neg91.0%
associate-/l*95.0%
Simplified95.0%
Final simplification91.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.15e+30) (not (<= z 8.5e-5))) (+ x (* y (/ (- z t) z))) (+ x (/ t (/ (- a z) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.15e+30) || !(z <= 8.5e-5)) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + (t / ((a - z) / 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 <= (-1.15d+30)) .or. (.not. (z <= 8.5d-5))) then
tmp = x + (y * ((z - t) / z))
else
tmp = x + (t / ((a - z) / 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 <= -1.15e+30) || !(z <= 8.5e-5)) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + (t / ((a - z) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.15e+30) or not (z <= 8.5e-5): tmp = x + (y * ((z - t) / z)) else: tmp = x + (t / ((a - z) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.15e+30) || !(z <= 8.5e-5)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); else tmp = Float64(x + Float64(t / Float64(Float64(a - z) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.15e+30) || ~((z <= 8.5e-5))) tmp = x + (y * ((z - t) / z)); else tmp = x + (t / ((a - z) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.15e+30], N[Not[LessEqual[z, 8.5e-5]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+30} \lor \neg \left(z \leq 8.5 \cdot 10^{-5}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\
\end{array}
\end{array}
if z < -1.15e30 or 8.500000000000001e-5 < z Initial program 99.9%
Taylor expanded in a around 0 87.3%
if -1.15e30 < z < 8.500000000000001e-5Initial program 95.9%
Taylor expanded in t around inf 90.7%
mul-1-neg90.7%
associate-/l*94.9%
Simplified94.9%
unsub-neg94.9%
clear-num94.9%
un-div-inv94.9%
Applied egg-rr94.9%
Final simplification91.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.7e-67) (not (<= z 2.4e-7))) (+ x (* y (/ (- z t) z))) (+ x (* (/ y a) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.7e-67) || !(z <= 2.4e-7)) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + ((y / a) * (t - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.7d-67)) .or. (.not. (z <= 2.4d-7))) then
tmp = x + (y * ((z - t) / z))
else
tmp = x + ((y / a) * (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.7e-67) || !(z <= 2.4e-7)) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + ((y / a) * (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.7e-67) or not (z <= 2.4e-7): tmp = x + (y * ((z - t) / z)) else: tmp = x + ((y / a) * (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.7e-67) || !(z <= 2.4e-7)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); else tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.7e-67) || ~((z <= 2.4e-7))) tmp = x + (y * ((z - t) / z)); else tmp = x + ((y / a) * (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.7e-67], N[Not[LessEqual[z, 2.4e-7]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-67} \lor \neg \left(z \leq 2.4 \cdot 10^{-7}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if z < -1.70000000000000005e-67 or 2.39999999999999979e-7 < z Initial program 99.9%
Taylor expanded in a around 0 85.5%
if -1.70000000000000005e-67 < z < 2.39999999999999979e-7Initial program 95.2%
Taylor expanded in a around inf 84.7%
mul-1-neg84.7%
unsub-neg84.7%
*-commutative84.7%
associate-/l*88.9%
Simplified88.9%
Final simplification87.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.3e-67) (not (<= z 1.9e-6))) (+ x (* y (/ (- z t) z))) (+ x (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.3e-67) || !(z <= 1.9e-6)) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + (y * ((t - 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 <= (-2.3d-67)) .or. (.not. (z <= 1.9d-6))) then
tmp = x + (y * ((z - t) / z))
else
tmp = x + (y * ((t - 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 <= -2.3e-67) || !(z <= 1.9e-6)) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.3e-67) or not (z <= 1.9e-6): tmp = x + (y * ((z - t) / z)) else: tmp = x + (y * ((t - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.3e-67) || !(z <= 1.9e-6)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.3e-67) || ~((z <= 1.9e-6))) tmp = x + (y * ((z - t) / z)); else tmp = x + (y * ((t - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.3e-67], N[Not[LessEqual[z, 1.9e-6]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-67} \lor \neg \left(z \leq 1.9 \cdot 10^{-6}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if z < -2.3e-67 or 1.9e-6 < z Initial program 99.9%
Taylor expanded in a around 0 85.5%
if -2.3e-67 < z < 1.9e-6Initial program 95.2%
clear-num94.9%
un-div-inv95.8%
Applied egg-rr95.8%
Taylor expanded in a around inf 84.7%
mul-1-neg84.7%
unsub-neg84.7%
associate-/l*87.5%
Simplified87.5%
Final simplification86.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.1e-67) (not (<= z 2.5e-7))) (+ x (* y (/ (- z t) z))) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.1e-67) || !(z <= 2.5e-7)) {
tmp = x + (y * ((z - t) / 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.1d-67)) .or. (.not. (z <= 2.5d-7))) then
tmp = x + (y * ((z - t) / 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.1e-67) || !(z <= 2.5e-7)) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.1e-67) or not (z <= 2.5e-7): tmp = x + (y * ((z - t) / z)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.1e-67) || !(z <= 2.5e-7)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / 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.1e-67) || ~((z <= 2.5e-7))) tmp = x + (y * ((z - t) / z)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.1e-67], N[Not[LessEqual[z, 2.5e-7]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / 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.1 \cdot 10^{-67} \lor \neg \left(z \leq 2.5 \cdot 10^{-7}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.1000000000000001e-67 or 2.49999999999999989e-7 < z Initial program 99.9%
Taylor expanded in a around 0 85.5%
if -1.1000000000000001e-67 < z < 2.49999999999999989e-7Initial program 95.2%
Taylor expanded in z around 0 83.2%
+-commutative83.2%
associate-/l*87.3%
Simplified87.3%
Final simplification86.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.3e+25) (not (<= z 2.15e-12))) (+ x y) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.3e+25) || !(z <= 2.15e-12)) {
tmp = x + y;
} 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.3d+25)) .or. (.not. (z <= 2.15d-12))) then
tmp = x + y
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.3e+25) || !(z <= 2.15e-12)) {
tmp = x + y;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.3e+25) or not (z <= 2.15e-12): tmp = x + y else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.3e+25) || !(z <= 2.15e-12)) tmp = Float64(x + y); 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.3e+25) || ~((z <= 2.15e-12))) tmp = x + y; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.3e+25], N[Not[LessEqual[z, 2.15e-12]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+25} \lor \neg \left(z \leq 2.15 \cdot 10^{-12}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.2999999999999999e25 or 2.14999999999999993e-12 < z Initial program 100.0%
Taylor expanded in z around inf 77.2%
+-commutative77.2%
Simplified77.2%
if -1.2999999999999999e25 < z < 2.14999999999999993e-12Initial program 95.8%
Taylor expanded in z around 0 80.4%
+-commutative80.4%
associate-/l*83.2%
Simplified83.2%
Final simplification80.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2e-66) (not (<= z 7.2e-11))) (+ x y) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2e-66) || !(z <= 7.2e-11)) {
tmp = x + y;
} else {
tmp = x + (y / (a / 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 <= (-2d-66)) .or. (.not. (z <= 7.2d-11))) then
tmp = x + y
else
tmp = x + (y / (a / 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 <= -2e-66) || !(z <= 7.2e-11)) {
tmp = x + y;
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2e-66) or not (z <= 7.2e-11): tmp = x + y else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2e-66) || !(z <= 7.2e-11)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2e-66) || ~((z <= 7.2e-11))) tmp = x + y; else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2e-66], N[Not[LessEqual[z, 7.2e-11]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-66} \lor \neg \left(z \leq 7.2 \cdot 10^{-11}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -2e-66 or 7.19999999999999969e-11 < z Initial program 99.9%
Taylor expanded in z around inf 74.8%
+-commutative74.8%
Simplified74.8%
if -2e-66 < z < 7.19999999999999969e-11Initial program 95.1%
clear-num94.9%
un-div-inv95.7%
Applied egg-rr95.7%
Taylor expanded in z around 0 86.5%
Final simplification79.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.12e-66) (not (<= z 3.15e-9))) (+ x y) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.12e-66) || !(z <= 3.15e-9)) {
tmp = x + y;
} 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 <= (-1.12d-66)) .or. (.not. (z <= 3.15d-9))) then
tmp = x + y
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 <= -1.12e-66) || !(z <= 3.15e-9)) {
tmp = x + y;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.12e-66) or not (z <= 3.15e-9): tmp = x + y else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.12e-66) || !(z <= 3.15e-9)) tmp = Float64(x + y); 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 <= -1.12e-66) || ~((z <= 3.15e-9))) tmp = x + y; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.12e-66], N[Not[LessEqual[z, 3.15e-9]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{-66} \lor \neg \left(z \leq 3.15 \cdot 10^{-9}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.12000000000000004e-66 or 3.1500000000000001e-9 < z Initial program 99.9%
Taylor expanded in z around inf 74.8%
+-commutative74.8%
Simplified74.8%
if -1.12000000000000004e-66 < z < 3.1500000000000001e-9Initial program 95.1%
Taylor expanded in z around 0 83.1%
*-commutative83.1%
associate-/l*85.8%
Simplified85.8%
Final simplification79.7%
(FPCore (x y z t a) :precision binary64 (if (<= x -2.4e-132) x (if (<= x 7.3e-225) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.4e-132) {
tmp = x;
} else if (x <= 7.3e-225) {
tmp = y;
} 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 (x <= (-2.4d-132)) then
tmp = x
else if (x <= 7.3d-225) then
tmp = y
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 (x <= -2.4e-132) {
tmp = x;
} else if (x <= 7.3e-225) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.4e-132: tmp = x elif x <= 7.3e-225: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.4e-132) tmp = x; elseif (x <= 7.3e-225) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.4e-132) tmp = x; elseif (x <= 7.3e-225) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.4e-132], x, If[LessEqual[x, 7.3e-225], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{-132}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7.3 \cdot 10^{-225}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.40000000000000015e-132 or 7.29999999999999997e-225 < x Initial program 98.5%
Taylor expanded in x around inf 62.8%
if -2.40000000000000015e-132 < x < 7.29999999999999997e-225Initial program 95.4%
clear-num95.1%
un-div-inv96.7%
Applied egg-rr96.7%
Taylor expanded in t around 0 38.6%
associate-*l/52.8%
associate-/r/51.6%
div-sub51.6%
*-inverses51.6%
Simplified51.6%
Taylor expanded in x around 0 43.6%
Taylor expanded in a around 0 40.5%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
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) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Initial program 97.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.1e+193) x (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.1e+193) {
tmp = x;
} else {
tmp = x + 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 (a <= (-1.1d+193)) then
tmp = x
else
tmp = x + y
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.1e+193) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.1e+193: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.1e+193) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.1e+193) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.1e+193], x, N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{+193}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.09999999999999993e193Initial program 96.8%
Taylor expanded in x around inf 72.5%
if -1.09999999999999993e193 < a Initial program 97.9%
Taylor expanded in z around inf 63.8%
+-commutative63.8%
Simplified63.8%
Final simplification64.7%
(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 97.8%
Taylor expanded in x around inf 50.9%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - 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 = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024108
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))