
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - 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 - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\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 t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - 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 - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (- x (/ y (/ (- t a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x - (y / ((t - 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 / ((t - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (y / ((t - a) / (z - t)));
}
def code(x, y, z, t, a): return x - (y / ((t - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x - Float64(y / Float64(Float64(t - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x - (y / ((t - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x - N[(y / N[(N[(t - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y}{\frac{t - a}{z - t}}
\end{array}
Initial program 87.0%
associate-/l*98.8%
Simplified98.8%
clear-num98.8%
un-div-inv99.2%
Applied egg-rr99.2%
Final simplification99.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.12e+182) (not (<= t 4.1e+48))) (+ x y) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.12e+182) || !(t <= 4.1e+48)) {
tmp = x + y;
} else {
tmp = x + (z * (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 ((t <= (-1.12d+182)) .or. (.not. (t <= 4.1d+48))) then
tmp = x + y
else
tmp = x + (z * (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 ((t <= -1.12e+182) || !(t <= 4.1e+48)) {
tmp = x + y;
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.12e+182) or not (t <= 4.1e+48): tmp = x + y else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.12e+182) || !(t <= 4.1e+48)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.12e+182) || ~((t <= 4.1e+48))) tmp = x + y; else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.12e+182], N[Not[LessEqual[t, 4.1e+48]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.12 \cdot 10^{+182} \lor \neg \left(t \leq 4.1 \cdot 10^{+48}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -1.11999999999999994e182 or 4.1000000000000003e48 < t Initial program 70.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 84.8%
+-commutative84.8%
Simplified84.8%
if -1.11999999999999994e182 < t < 4.1000000000000003e48Initial program 92.9%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in z around inf 82.9%
*-commutative82.9%
associate-/l*86.9%
Applied egg-rr86.9%
Final simplification86.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.9e+20) (not (<= z 1.2e+40))) (+ x (* z (/ y (- a t)))) (+ x (/ y (- 1.0 (/ a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e+20) || !(z <= 1.2e+40)) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = x + (y / (1.0 - (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 <= (-1.9d+20)) .or. (.not. (z <= 1.2d+40))) then
tmp = x + (z * (y / (a - t)))
else
tmp = x + (y / (1.0d0 - (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 <= -1.9e+20) || !(z <= 1.2e+40)) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = x + (y / (1.0 - (a / t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.9e+20) or not (z <= 1.2e+40): tmp = x + (z * (y / (a - t))) else: tmp = x + (y / (1.0 - (a / t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.9e+20) || !(z <= 1.2e+40)) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.9e+20) || ~((z <= 1.2e+40))) tmp = x + (z * (y / (a - t))); else tmp = x + (y / (1.0 - (a / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.9e+20], N[Not[LessEqual[z, 1.2e+40]], $MachinePrecision]], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+20} \lor \neg \left(z \leq 1.2 \cdot 10^{+40}\right):\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{t}}\\
\end{array}
\end{array}
if z < -1.9e20 or 1.2e40 < z Initial program 81.8%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in z around inf 78.3%
*-commutative78.3%
associate-/l*86.1%
Applied egg-rr86.1%
if -1.9e20 < z < 1.2e40Initial program 92.4%
associate-/l*99.3%
Simplified99.3%
clear-num99.2%
un-div-inv99.2%
Applied egg-rr99.2%
Taylor expanded in z around 0 93.1%
mul-1-neg93.1%
div-sub93.1%
sub-neg93.1%
*-inverses93.1%
metadata-eval93.1%
Simplified93.1%
Taylor expanded in y around 0 93.1%
Final simplification89.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.9e+20) (not (<= z 1.5e+40))) (+ x (/ y (/ (- a t) z))) (+ x (/ y (- 1.0 (/ a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e+20) || !(z <= 1.5e+40)) {
tmp = x + (y / ((a - t) / z));
} else {
tmp = x + (y / (1.0 - (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 <= (-1.9d+20)) .or. (.not. (z <= 1.5d+40))) then
tmp = x + (y / ((a - t) / z))
else
tmp = x + (y / (1.0d0 - (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 <= -1.9e+20) || !(z <= 1.5e+40)) {
tmp = x + (y / ((a - t) / z));
} else {
tmp = x + (y / (1.0 - (a / t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.9e+20) or not (z <= 1.5e+40): tmp = x + (y / ((a - t) / z)) else: tmp = x + (y / (1.0 - (a / t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.9e+20) || !(z <= 1.5e+40)) tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); else tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.9e+20) || ~((z <= 1.5e+40))) tmp = x + (y / ((a - t) / z)); else tmp = x + (y / (1.0 - (a / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.9e+20], N[Not[LessEqual[z, 1.5e+40]], $MachinePrecision]], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+20} \lor \neg \left(z \leq 1.5 \cdot 10^{+40}\right):\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{t}}\\
\end{array}
\end{array}
if z < -1.9e20 or 1.5000000000000001e40 < z Initial program 81.8%
associate-/l*98.3%
Simplified98.3%
clear-num98.3%
un-div-inv99.1%
Applied egg-rr99.1%
Taylor expanded in z around inf 86.9%
if -1.9e20 < z < 1.5000000000000001e40Initial program 92.4%
associate-/l*99.3%
Simplified99.3%
clear-num99.2%
un-div-inv99.2%
Applied egg-rr99.2%
Taylor expanded in z around 0 93.1%
mul-1-neg93.1%
div-sub93.1%
sub-neg93.1%
*-inverses93.1%
metadata-eval93.1%
Simplified93.1%
Taylor expanded in y around 0 93.1%
Final simplification90.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.8e+89) (not (<= t 4.5e+45))) (+ x (* y (- 1.0 (/ z t)))) (+ x (/ y (/ (- a t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.8e+89) || !(t <= 4.5e+45)) {
tmp = x + (y * (1.0 - (z / t)));
} 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 ((t <= (-6.8d+89)) .or. (.not. (t <= 4.5d+45))) then
tmp = x + (y * (1.0d0 - (z / t)))
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 ((t <= -6.8e+89) || !(t <= 4.5e+45)) {
tmp = x + (y * (1.0 - (z / t)));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.8e+89) or not (t <= 4.5e+45): tmp = x + (y * (1.0 - (z / t))) else: tmp = x + (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.8e+89) || !(t <= 4.5e+45)) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(z / t)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6.8e+89) || ~((t <= 4.5e+45))) tmp = x + (y * (1.0 - (z / t))); else tmp = x + (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.8e+89], N[Not[LessEqual[t, 4.5e+45]], $MachinePrecision]], N[(x + N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+89} \lor \neg \left(t \leq 4.5 \cdot 10^{+45}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if t < -6.8000000000000004e89 or 4.4999999999999998e45 < t Initial program 73.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 71.3%
mul-1-neg71.3%
unsub-neg71.3%
associate-/l*94.6%
div-sub94.6%
sub-neg94.6%
*-inverses94.6%
metadata-eval94.6%
Simplified94.6%
if -6.8000000000000004e89 < t < 4.4999999999999998e45Initial program 93.8%
associate-/l*98.2%
Simplified98.2%
clear-num98.2%
un-div-inv98.8%
Applied egg-rr98.8%
Taylor expanded in z around inf 89.0%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.15e+90) (+ x (* y (- 1.0 (/ z t)))) (if (<= t 1.55e+47) (+ x (/ y (/ (- a t) z))) (+ x (- y (* y (/ z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.15e+90) {
tmp = x + (y * (1.0 - (z / t)));
} else if (t <= 1.55e+47) {
tmp = x + (y / ((a - t) / z));
} else {
tmp = x + (y - (y * (z / 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 (t <= (-1.15d+90)) then
tmp = x + (y * (1.0d0 - (z / t)))
else if (t <= 1.55d+47) then
tmp = x + (y / ((a - t) / z))
else
tmp = x + (y - (y * (z / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.15e+90) {
tmp = x + (y * (1.0 - (z / t)));
} else if (t <= 1.55e+47) {
tmp = x + (y / ((a - t) / z));
} else {
tmp = x + (y - (y * (z / t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.15e+90: tmp = x + (y * (1.0 - (z / t))) elif t <= 1.55e+47: tmp = x + (y / ((a - t) / z)) else: tmp = x + (y - (y * (z / t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.15e+90) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(z / t)))); elseif (t <= 1.55e+47) tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); else tmp = Float64(x + Float64(y - Float64(y * Float64(z / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.15e+90) tmp = x + (y * (1.0 - (z / t))); elseif (t <= 1.55e+47) tmp = x + (y / ((a - t) / z)); else tmp = x + (y - (y * (z / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.15e+90], N[(x + N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e+47], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+90}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+47}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - y \cdot \frac{z}{t}\right)\\
\end{array}
\end{array}
if t < -1.15e90Initial program 77.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in a around 0 75.0%
mul-1-neg75.0%
unsub-neg75.0%
associate-/l*97.1%
div-sub97.1%
sub-neg97.1%
*-inverses97.1%
metadata-eval97.1%
Simplified97.1%
if -1.15e90 < t < 1.55e47Initial program 93.8%
associate-/l*98.2%
Simplified98.2%
clear-num98.2%
un-div-inv98.8%
Applied egg-rr98.8%
Taylor expanded in z around inf 89.1%
if 1.55e47 < t Initial program 69.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 68.2%
mul-1-neg68.2%
unsub-neg68.2%
associate-/l*92.8%
div-sub92.8%
sub-neg92.8%
*-inverses92.8%
metadata-eval92.8%
Simplified92.8%
distribute-lft-in92.8%
*-commutative92.8%
neg-mul-192.8%
Applied egg-rr92.8%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.8e+89) (not (<= t 1.25e-9))) (+ x y) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.8e+89) || !(t <= 1.25e-9)) {
tmp = x + y;
} else {
tmp = x + (z * (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 ((t <= (-6.8d+89)) .or. (.not. (t <= 1.25d-9))) then
tmp = x + y
else
tmp = x + (z * (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 ((t <= -6.8e+89) || !(t <= 1.25e-9)) {
tmp = x + y;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.8e+89) or not (t <= 1.25e-9): tmp = x + y else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.8e+89) || !(t <= 1.25e-9)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6.8e+89) || ~((t <= 1.25e-9))) tmp = x + y; else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.8e+89], N[Not[LessEqual[t, 1.25e-9]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+89} \lor \neg \left(t \leq 1.25 \cdot 10^{-9}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -6.8000000000000004e89 or 1.25e-9 < t Initial program 77.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 79.2%
+-commutative79.2%
Simplified79.2%
if -6.8000000000000004e89 < t < 1.25e-9Initial program 93.2%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in t around 0 74.8%
*-commutative74.8%
associate-/l*79.1%
Applied egg-rr79.1%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.45e+90) (not (<= t 8.6e+47))) (+ x y) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.45e+90) || !(t <= 8.6e+47)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.45d+90)) .or. (.not. (t <= 8.6d+47))) then
tmp = x + y
else
tmp = x + (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.45e+90) || !(t <= 8.6e+47)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.45e+90) or not (t <= 8.6e+47): tmp = x + y else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.45e+90) || !(t <= 8.6e+47)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.45e+90) || ~((t <= 8.6e+47))) tmp = x + y; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.45e+90], N[Not[LessEqual[t, 8.6e+47]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{+90} \lor \neg \left(t \leq 8.6 \cdot 10^{+47}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -1.4500000000000001e90 or 8.59999999999999989e47 < t Initial program 73.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 82.0%
+-commutative82.0%
Simplified82.0%
if -1.4500000000000001e90 < t < 8.59999999999999989e47Initial program 93.8%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in t around 0 74.0%
+-commutative74.0%
associate-/l*78.4%
Simplified78.4%
Final simplification79.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.3e-20) (not (<= t 4.4e-133))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.3e-20) || !(t <= 4.4e-133)) {
tmp = x + 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 ((t <= (-1.3d-20)) .or. (.not. (t <= 4.4d-133))) then
tmp = x + 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 ((t <= -1.3e-20) || !(t <= 4.4e-133)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.3e-20) or not (t <= 4.4e-133): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.3e-20) || !(t <= 4.4e-133)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.3e-20) || ~((t <= 4.4e-133))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.3e-20], N[Not[LessEqual[t, 4.4e-133]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{-20} \lor \neg \left(t \leq 4.4 \cdot 10^{-133}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.29999999999999997e-20 or 4.4000000000000001e-133 < t Initial program 82.7%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in t around inf 69.2%
+-commutative69.2%
Simplified69.2%
if -1.29999999999999997e-20 < t < 4.4000000000000001e-133Initial program 93.4%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in x around inf 50.5%
Final simplification61.7%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - 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 - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Initial program 87.0%
associate-/l*98.8%
Simplified98.8%
Final simplification98.8%
(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.0%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in x around inf 47.7%
Final simplification47.7%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (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 / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
herbie shell --seed 2024078
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:alt
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))