
(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 12 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 (if (<= z -5e+90) (+ x (* (- z t) (/ y (- a t)))) (+ x (/ y (/ (- a t) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e+90) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = x + (y / ((a - t) / (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 (z <= (-5d+90)) then
tmp = x + ((z - t) * (y / (a - t)))
else
tmp = x + (y / ((a - t) / (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 (z <= -5e+90) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = x + (y / ((a - t) / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e+90: tmp = x + ((z - t) * (y / (a - t))) else: tmp = x + (y / ((a - t) / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e+90) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e+90) tmp = x + ((z - t) * (y / (a - t))); else tmp = x + (y / ((a - t) / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e+90], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+90}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\end{array}
\end{array}
if z < -5.0000000000000004e90Initial program 79.6%
*-commutative79.6%
associate-/l*98.3%
Applied egg-rr98.3%
if -5.0000000000000004e90 < z Initial program 91.6%
associate-/l*98.6%
Simplified98.6%
clear-num98.6%
un-div-inv98.6%
Applied egg-rr98.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.8e+46) (not (<= t 3.4e+84))) (+ x y) (+ x (/ (* z y) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.8e+46) || !(t <= 3.4e+84)) {
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 <= (-2.8d+46)) .or. (.not. (t <= 3.4d+84))) 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 <= -2.8e+46) || !(t <= 3.4e+84)) {
tmp = x + y;
} else {
tmp = x + ((z * y) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.8e+46) or not (t <= 3.4e+84): tmp = x + y else: tmp = x + ((z * y) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.8e+46) || !(t <= 3.4e+84)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(z * y) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.8e+46) || ~((t <= 3.4e+84))) 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, -2.8e+46], N[Not[LessEqual[t, 3.4e+84]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+46} \lor \neg \left(t \leq 3.4 \cdot 10^{+84}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot y}{a - t}\\
\end{array}
\end{array}
if t < -2.80000000000000018e46 or 3.3999999999999998e84 < t Initial program 79.9%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 84.8%
+-commutative84.8%
Simplified84.8%
if -2.80000000000000018e46 < t < 3.3999999999999998e84Initial program 96.2%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in z around inf 88.6%
Final simplification87.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.2e+56) (not (<= t 2.9e+84))) (+ x y) (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.2e+56) || !(t <= 2.9e+84)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (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 <= (-4.2d+56)) .or. (.not. (t <= 2.9d+84))) then
tmp = x + y
else
tmp = x + (y * (z / (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 <= -4.2e+56) || !(t <= 2.9e+84)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.2e+56) or not (t <= 2.9e+84): tmp = x + y else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.2e+56) || !(t <= 2.9e+84)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.2e+56) || ~((t <= 2.9e+84))) tmp = x + y; else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.2e+56], N[Not[LessEqual[t, 2.9e+84]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+56} \lor \neg \left(t \leq 2.9 \cdot 10^{+84}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -4.20000000000000034e56 or 2.89999999999999989e84 < t Initial program 80.7%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 84.7%
+-commutative84.7%
Simplified84.7%
if -4.20000000000000034e56 < t < 2.89999999999999989e84Initial program 95.5%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in z around inf 88.0%
associate-/l*88.1%
Simplified88.1%
Final simplification86.7%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.7e-22) (+ x (* y (/ t (- t a)))) (if (<= t 7e+16) (+ x (/ (* z y) (- a t))) (+ x (* y (- 1.0 (/ z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.7e-22) {
tmp = x + (y * (t / (t - a)));
} else if (t <= 7e+16) {
tmp = x + ((z * y) / (a - t));
} else {
tmp = x + (y * (1.0 - (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 <= (-2.7d-22)) then
tmp = x + (y * (t / (t - a)))
else if (t <= 7d+16) then
tmp = x + ((z * y) / (a - t))
else
tmp = x + (y * (1.0d0 - (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 <= -2.7e-22) {
tmp = x + (y * (t / (t - a)));
} else if (t <= 7e+16) {
tmp = x + ((z * y) / (a - t));
} else {
tmp = x + (y * (1.0 - (z / t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.7e-22: tmp = x + (y * (t / (t - a))) elif t <= 7e+16: tmp = x + ((z * y) / (a - t)) else: tmp = x + (y * (1.0 - (z / t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.7e-22) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); elseif (t <= 7e+16) tmp = Float64(x + Float64(Float64(z * y) / Float64(a - t))); else tmp = Float64(x + Float64(y * Float64(1.0 - Float64(z / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.7e-22) tmp = x + (y * (t / (t - a))); elseif (t <= 7e+16) tmp = x + ((z * y) / (a - t)); else tmp = x + (y * (1.0 - (z / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.7e-22], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+16], N[(x + N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-22}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+16}:\\
\;\;\;\;x + \frac{z \cdot y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{t}\right)\\
\end{array}
\end{array}
if t < -2.7000000000000002e-22Initial program 83.9%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 83.8%
mul-1-neg83.8%
unsub-neg83.8%
*-commutative83.8%
associate-/l*95.1%
Simplified95.1%
if -2.7000000000000002e-22 < t < 7e16Initial program 96.3%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in z around inf 89.9%
if 7e16 < t Initial program 80.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 72.6%
mul-1-neg72.6%
unsub-neg72.6%
associate-/l*89.1%
div-sub89.1%
sub-neg89.1%
*-inverses89.1%
metadata-eval89.1%
Simplified89.1%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.15e+50) (+ x y) (if (<= t 7e+30) (+ x (/ (* z y) (- a t))) (+ x (* y (- 1.0 (/ z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.15e+50) {
tmp = x + y;
} else if (t <= 7e+30) {
tmp = x + ((z * y) / (a - t));
} else {
tmp = x + (y * (1.0 - (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 <= (-2.15d+50)) then
tmp = x + y
else if (t <= 7d+30) then
tmp = x + ((z * y) / (a - t))
else
tmp = x + (y * (1.0d0 - (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 <= -2.15e+50) {
tmp = x + y;
} else if (t <= 7e+30) {
tmp = x + ((z * y) / (a - t));
} else {
tmp = x + (y * (1.0 - (z / t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.15e+50: tmp = x + y elif t <= 7e+30: tmp = x + ((z * y) / (a - t)) else: tmp = x + (y * (1.0 - (z / t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.15e+50) tmp = Float64(x + y); elseif (t <= 7e+30) tmp = Float64(x + Float64(Float64(z * y) / Float64(a - t))); else tmp = Float64(x + Float64(y * Float64(1.0 - Float64(z / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.15e+50) tmp = x + y; elseif (t <= 7e+30) tmp = x + ((z * y) / (a - t)); else tmp = x + (y * (1.0 - (z / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.15e+50], N[(x + y), $MachinePrecision], If[LessEqual[t, 7e+30], N[(x + N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.15 \cdot 10^{+50}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+30}:\\
\;\;\;\;x + \frac{z \cdot y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{t}\right)\\
\end{array}
\end{array}
if t < -2.1499999999999999e50Initial program 80.6%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 93.1%
+-commutative93.1%
Simplified93.1%
if -2.1499999999999999e50 < t < 7.00000000000000042e30Initial program 96.6%
associate-/l*94.7%
Simplified94.7%
Taylor expanded in z around inf 89.9%
if 7.00000000000000042e30 < t Initial program 80.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 72.6%
mul-1-neg72.6%
unsub-neg72.6%
associate-/l*89.1%
div-sub89.1%
sub-neg89.1%
*-inverses89.1%
metadata-eval89.1%
Simplified89.1%
Final simplification90.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.9e-57) (not (<= t 2.5e+38))) (+ x y) (+ x (/ y (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.9e-57) || !(t <= 2.5e+38)) {
tmp = x + y;
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.9d-57)) .or. (.not. (t <= 2.5d+38))) then
tmp = x + y
else
tmp = x + (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.9e-57) || !(t <= 2.5e+38)) {
tmp = x + y;
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.9e-57) or not (t <= 2.5e+38): tmp = x + y else: tmp = x + (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.9e-57) || !(t <= 2.5e+38)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.9e-57) || ~((t <= 2.5e+38))) tmp = x + y; else tmp = x + (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.9e-57], N[Not[LessEqual[t, 2.5e+38]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-57} \lor \neg \left(t \leq 2.5 \cdot 10^{+38}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -1.8999999999999999e-57 or 2.49999999999999985e38 < t Initial program 83.5%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 81.6%
+-commutative81.6%
Simplified81.6%
if -1.8999999999999999e-57 < t < 2.49999999999999985e38Initial program 95.5%
associate-/l*94.1%
Simplified94.1%
clear-num94.1%
un-div-inv94.0%
Applied egg-rr94.0%
Taylor expanded in t around 0 79.4%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.05e-57) (not (<= t 8.2e+36))) (+ x y) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.05e-57) || !(t <= 8.2e+36)) {
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 <= (-2.05d-57)) .or. (.not. (t <= 8.2d+36))) 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 <= -2.05e-57) || !(t <= 8.2e+36)) {
tmp = x + y;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.05e-57) or not (t <= 8.2e+36): tmp = x + y else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.05e-57) || !(t <= 8.2e+36)) 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 <= -2.05e-57) || ~((t <= 8.2e+36))) tmp = x + y; else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.05e-57], N[Not[LessEqual[t, 8.2e+36]], $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 -2.05 \cdot 10^{-57} \lor \neg \left(t \leq 8.2 \cdot 10^{+36}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -2.0500000000000001e-57 or 8.20000000000000026e36 < t Initial program 83.5%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 81.6%
+-commutative81.6%
Simplified81.6%
if -2.0500000000000001e-57 < t < 8.20000000000000026e36Initial program 95.5%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in t around 0 77.9%
*-commutative77.9%
associate-/l*77.7%
Applied egg-rr77.7%
Final simplification79.6%
(FPCore (x y z t a) :precision binary64 (if (<= x -9.5e-76) x (if (<= x 2.95e-255) (* y (- 1.0 (/ z t))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -9.5e-76) {
tmp = x;
} else if (x <= 2.95e-255) {
tmp = y * (1.0 - (z / t));
} 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 (x <= (-9.5d-76)) then
tmp = x
else if (x <= 2.95d-255) then
tmp = y * (1.0d0 - (z / t))
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 (x <= -9.5e-76) {
tmp = x;
} else if (x <= 2.95e-255) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -9.5e-76: tmp = x elif x <= 2.95e-255: tmp = y * (1.0 - (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -9.5e-76) tmp = x; elseif (x <= 2.95e-255) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -9.5e-76) tmp = x; elseif (x <= 2.95e-255) tmp = y * (1.0 - (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -9.5e-76], x, If[LessEqual[x, 2.95e-255], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{-76}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.95 \cdot 10^{-255}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if x < -9.49999999999999984e-76Initial program 91.9%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in x around inf 73.2%
if -9.49999999999999984e-76 < x < 2.95e-255Initial program 84.5%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in a around 0 51.4%
mul-1-neg51.4%
unsub-neg51.4%
associate-/l*59.0%
div-sub59.0%
sub-neg59.0%
*-inverses59.0%
metadata-eval59.0%
Simplified59.0%
Taylor expanded in y around inf 51.8%
if 2.95e-255 < x Initial program 90.7%
associate-/l*95.8%
Simplified95.8%
Taylor expanded in t around inf 67.5%
+-commutative67.5%
Simplified67.5%
Final simplification65.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -5e+91) (+ x (* (- z t) (/ y (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e+91) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = x + (y * ((z - t) / (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 <= (-5d+91)) then
tmp = x + ((z - t) * (y / (a - t)))
else
tmp = x + (y * ((z - t) / (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 <= -5e+91) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = x + (y * ((z - t) / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e+91: tmp = x + ((z - t) * (y / (a - t))) else: tmp = x + (y * ((z - t) / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e+91) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e+91) tmp = x + ((z - t) * (y / (a - t))); else tmp = x + (y * ((z - t) / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e+91], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+91}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if z < -5.0000000000000002e91Initial program 79.6%
*-commutative79.6%
associate-/l*98.3%
Applied egg-rr98.3%
if -5.0000000000000002e91 < z Initial program 91.6%
associate-/l*98.6%
Simplified98.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.9e-42) (not (<= t 1.5e+33))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.9e-42) || !(t <= 1.5e+33)) {
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.9d-42)) .or. (.not. (t <= 1.5d+33))) 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.9e-42) || !(t <= 1.5e+33)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.9e-42) or not (t <= 1.5e+33): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.9e-42) || !(t <= 1.5e+33)) 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.9e-42) || ~((t <= 1.5e+33))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.9e-42], N[Not[LessEqual[t, 1.5e+33]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-42} \lor \neg \left(t \leq 1.5 \cdot 10^{+33}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.90000000000000009e-42 or 1.49999999999999992e33 < t Initial program 82.7%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 82.2%
+-commutative82.2%
Simplified82.2%
if -1.90000000000000009e-42 < t < 1.49999999999999992e33Initial program 96.2%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in x around inf 48.9%
Final simplification65.1%
(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 89.6%
associate-/l*97.0%
Simplified97.0%
(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 89.6%
associate-/l*97.0%
Simplified97.0%
Taylor expanded in x around inf 52.5%
(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 2024087
(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))))