
(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 (/ (- a t) (- t z)))))
double code(double x, double y, double z, double t, double a) {
return x - (y / ((a - t) / (t - 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 / ((a - t) / (t - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (y / ((a - t) / (t - z)));
}
def code(x, y, z, t, a): return x - (y / ((a - t) / (t - z)))
function code(x, y, z, t, a) return Float64(x - Float64(y / Float64(Float64(a - t) / Float64(t - z)))) end
function tmp = code(x, y, z, t, a) tmp = x - (y / ((a - t) / (t - z))); end
code[x_, y_, z_, t_, a_] := N[(x - N[(y / N[(N[(a - t), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y}{\frac{a - t}{t - z}}
\end{array}
Initial program 85.3%
associate-/l*97.6%
Simplified97.6%
clear-num97.6%
un-div-inv97.6%
Applied egg-rr97.6%
Final simplification97.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.52e+37) (not (<= t 1.2e+53))) (+ x y) (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.52e+37) || !(t <= 1.2e+53)) {
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 <= (-1.52d+37)) .or. (.not. (t <= 1.2d+53))) 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 <= -1.52e+37) || !(t <= 1.2e+53)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.52e+37) or not (t <= 1.2e+53): tmp = x + y else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.52e+37) || !(t <= 1.2e+53)) 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 <= -1.52e+37) || ~((t <= 1.2e+53))) 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, -1.52e+37], N[Not[LessEqual[t, 1.2e+53]], $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 -1.52 \cdot 10^{+37} \lor \neg \left(t \leq 1.2 \cdot 10^{+53}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -1.5200000000000001e37 or 1.2e53 < t Initial program 73.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 80.9%
+-commutative80.9%
Simplified80.9%
if -1.5200000000000001e37 < t < 1.2e53Initial program 94.7%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in z around inf 87.3%
associate-/l*88.0%
Simplified88.0%
Final simplification84.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.6e+36) (not (<= t 2.75e+50))) (+ x y) (+ x (/ y (/ (- a t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.6e+36) || !(t <= 2.75e+50)) {
tmp = x + y;
} 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 <= (-3.6d+36)) .or. (.not. (t <= 2.75d+50))) then
tmp = x + y
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 <= -3.6e+36) || !(t <= 2.75e+50)) {
tmp = x + y;
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.6e+36) or not (t <= 2.75e+50): tmp = x + y else: tmp = x + (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.6e+36) || !(t <= 2.75e+50)) tmp = Float64(x + y); 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 <= -3.6e+36) || ~((t <= 2.75e+50))) tmp = x + y; else tmp = x + (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.6e+36], N[Not[LessEqual[t, 2.75e+50]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{+36} \lor \neg \left(t \leq 2.75 \cdot 10^{+50}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if t < -3.5999999999999997e36 or 2.7499999999999999e50 < t Initial program 73.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 80.9%
+-commutative80.9%
Simplified80.9%
if -3.5999999999999997e36 < t < 2.7499999999999999e50Initial program 94.7%
associate-/l*95.9%
Simplified95.9%
clear-num95.9%
un-div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in z around inf 88.1%
Final simplification85.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.2e+31) (not (<= t 2.7e-22))) (- x (* t (/ y (- a t)))) (+ x (/ y (/ (- a t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.2e+31) || !(t <= 2.7e-22)) {
tmp = x - (t * (y / (a - 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 <= (-2.2d+31)) .or. (.not. (t <= 2.7d-22))) then
tmp = x - (t * (y / (a - 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 <= -2.2e+31) || !(t <= 2.7e-22)) {
tmp = x - (t * (y / (a - t)));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.2e+31) or not (t <= 2.7e-22): tmp = x - (t * (y / (a - t))) else: tmp = x + (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.2e+31) || !(t <= 2.7e-22)) tmp = Float64(x - Float64(t * Float64(y / Float64(a - 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 <= -2.2e+31) || ~((t <= 2.7e-22))) tmp = x - (t * (y / (a - t))); else tmp = x + (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.2e+31], N[Not[LessEqual[t, 2.7e-22]], $MachinePrecision]], N[(x - N[(t * N[(y / N[(a - 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 -2.2 \cdot 10^{+31} \lor \neg \left(t \leq 2.7 \cdot 10^{-22}\right):\\
\;\;\;\;x - t \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if t < -2.2000000000000001e31 or 2.7000000000000002e-22 < t Initial program 75.6%
associate-/l*99.9%
Simplified99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 69.2%
mul-1-neg69.2%
unsub-neg69.2%
associate-/l*84.7%
Simplified84.7%
if -2.2000000000000001e31 < t < 2.7000000000000002e-22Initial program 94.2%
associate-/l*95.5%
Simplified95.5%
clear-num95.5%
un-div-inv95.5%
Applied egg-rr95.5%
Taylor expanded in z around inf 89.4%
Final simplification87.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.7e+34) (not (<= t 2.4e-22))) (+ x (* y (/ t (- t a)))) (+ x (/ y (/ (- a t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.7e+34) || !(t <= 2.4e-22)) {
tmp = x + (y * (t / (t - a)));
} 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 <= (-3.7d+34)) .or. (.not. (t <= 2.4d-22))) then
tmp = x + (y * (t / (t - a)))
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 <= -3.7e+34) || !(t <= 2.4e-22)) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.7e+34) or not (t <= 2.4e-22): tmp = x + (y * (t / (t - a))) else: tmp = x + (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.7e+34) || !(t <= 2.4e-22)) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); 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 <= -3.7e+34) || ~((t <= 2.4e-22))) tmp = x + (y * (t / (t - a))); else tmp = x + (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.7e+34], N[Not[LessEqual[t, 2.4e-22]], $MachinePrecision]], N[(x + N[(y * N[(t / N[(t - a), $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 -3.7 \cdot 10^{+34} \lor \neg \left(t \leq 2.4 \cdot 10^{-22}\right):\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if t < -3.70000000000000009e34 or 2.40000000000000002e-22 < t Initial program 75.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 69.2%
mul-1-neg69.2%
unsub-neg69.2%
*-commutative69.2%
associate-/l*88.6%
Simplified88.6%
if -3.70000000000000009e34 < t < 2.40000000000000002e-22Initial program 94.2%
associate-/l*95.5%
Simplified95.5%
clear-num95.5%
un-div-inv95.5%
Applied egg-rr95.5%
Taylor expanded in z around inf 89.4%
Final simplification89.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.4e+34) (not (<= t 2.2e-77))) (+ x y) (+ x (/ (* y z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.4e+34) || !(t <= 2.2e-77)) {
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.4d+34)) .or. (.not. (t <= 2.2d-77))) 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.4e+34) || !(t <= 2.2e-77)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.4e+34) or not (t <= 2.2e-77): tmp = x + y else: tmp = x + ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.4e+34) || !(t <= 2.2e-77)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.4e+34) || ~((t <= 2.2e-77))) 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.4e+34], N[Not[LessEqual[t, 2.2e-77]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{+34} \lor \neg \left(t \leq 2.2 \cdot 10^{-77}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if t < -1.40000000000000004e34 or 2.20000000000000007e-77 < t Initial program 75.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 78.9%
+-commutative78.9%
Simplified78.9%
if -1.40000000000000004e34 < t < 2.20000000000000007e-77Initial program 94.8%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in t around 0 81.3%
Final simplification80.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8.2e+31) (not (<= t 1.22e-23))) (+ x y) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8.2e+31) || !(t <= 1.22e-23)) {
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 <= (-8.2d+31)) .or. (.not. (t <= 1.22d-23))) 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 <= -8.2e+31) || !(t <= 1.22e-23)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8.2e+31) or not (t <= 1.22e-23): tmp = x + y else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -8.2e+31) || !(t <= 1.22e-23)) 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 <= -8.2e+31) || ~((t <= 1.22e-23))) tmp = x + y; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8.2e+31], N[Not[LessEqual[t, 1.22e-23]], $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 -8.2 \cdot 10^{+31} \lor \neg \left(t \leq 1.22 \cdot 10^{-23}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -8.2000000000000003e31 or 1.22000000000000007e-23 < t Initial program 75.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 79.7%
+-commutative79.7%
Simplified79.7%
if -8.2000000000000003e31 < t < 1.22000000000000007e-23Initial program 94.2%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in t around 0 80.4%
+-commutative80.4%
associate-/l*82.0%
Simplified82.0%
Final simplification80.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -7.2e+29) (not (<= t 1.2e-22))) (+ x y) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -7.2e+29) || !(t <= 1.2e-22)) {
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 <= (-7.2d+29)) .or. (.not. (t <= 1.2d-22))) 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 <= -7.2e+29) || !(t <= 1.2e-22)) {
tmp = x + y;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -7.2e+29) or not (t <= 1.2e-22): tmp = x + y else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -7.2e+29) || !(t <= 1.2e-22)) 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 <= -7.2e+29) || ~((t <= 1.2e-22))) tmp = x + y; else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -7.2e+29], N[Not[LessEqual[t, 1.2e-22]], $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 -7.2 \cdot 10^{+29} \lor \neg \left(t \leq 1.2 \cdot 10^{-22}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -7.19999999999999952e29 or 1.20000000000000001e-22 < t Initial program 75.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 79.7%
+-commutative79.7%
Simplified79.7%
if -7.19999999999999952e29 < t < 1.20000000000000001e-22Initial program 94.2%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in t around 0 80.4%
+-commutative80.4%
associate-/l*82.0%
Simplified82.0%
clear-num81.9%
un-div-inv82.0%
Applied egg-rr82.0%
associate-/r/83.4%
Applied egg-rr83.4%
Final simplification81.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.8e+29) (not (<= t 1.3e-77))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.8e+29) || !(t <= 1.3e-77)) {
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 <= (-4.8d+29)) .or. (.not. (t <= 1.3d-77))) 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 <= -4.8e+29) || !(t <= 1.3e-77)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.8e+29) or not (t <= 1.3e-77): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.8e+29) || !(t <= 1.3e-77)) 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 <= -4.8e+29) || ~((t <= 1.3e-77))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.8e+29], N[Not[LessEqual[t, 1.3e-77]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+29} \lor \neg \left(t \leq 1.3 \cdot 10^{-77}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -4.8000000000000002e29 or 1.3000000000000001e-77 < t Initial program 75.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 78.9%
+-commutative78.9%
Simplified78.9%
if -4.8000000000000002e29 < t < 1.3000000000000001e-77Initial program 94.8%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in x around inf 48.2%
Final simplification63.4%
(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 85.3%
associate-/l*97.6%
Simplified97.6%
Final simplification97.6%
(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 85.3%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in x around inf 48.5%
Final simplification48.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 2024082
(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))))