
(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 14 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 (* (- z t) (/ y (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (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 + ((z - t) * (y / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - t)));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{a - t}
\end{array}
Initial program 88.5%
*-commutative88.5%
associate-/l*97.7%
Applied egg-rr97.7%
Final simplification97.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2e+33)
(+ x y)
(if (<= t -8.5e-124)
(- x (* y (/ z t)))
(if (<= t 7e+82) (+ x (* z (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e+33) {
tmp = x + y;
} else if (t <= -8.5e-124) {
tmp = x - (y * (z / t));
} else if (t <= 7e+82) {
tmp = x + (z * (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 (t <= (-2d+33)) then
tmp = x + y
else if (t <= (-8.5d-124)) then
tmp = x - (y * (z / t))
else if (t <= 7d+82) then
tmp = x + (z * (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 (t <= -2e+33) {
tmp = x + y;
} else if (t <= -8.5e-124) {
tmp = x - (y * (z / t));
} else if (t <= 7e+82) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2e+33: tmp = x + y elif t <= -8.5e-124: tmp = x - (y * (z / t)) elif t <= 7e+82: tmp = x + (z * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2e+33) tmp = Float64(x + y); elseif (t <= -8.5e-124) tmp = Float64(x - Float64(y * Float64(z / t))); elseif (t <= 7e+82) tmp = Float64(x + Float64(z * 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 (t <= -2e+33) tmp = x + y; elseif (t <= -8.5e-124) tmp = x - (y * (z / t)); elseif (t <= 7e+82) tmp = x + (z * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2e+33], N[(x + y), $MachinePrecision], If[LessEqual[t, -8.5e-124], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+82], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+33}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-124}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+82}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.9999999999999999e33 or 7.0000000000000001e82 < t Initial program 78.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 85.0%
+-commutative85.0%
Simplified85.0%
if -1.9999999999999999e33 < t < -8.5000000000000002e-124Initial program 97.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 82.8%
Taylor expanded in a around 0 75.7%
mul-1-neg75.7%
unsub-neg75.7%
associate-/l*75.7%
Simplified75.7%
if -8.5000000000000002e-124 < t < 7.0000000000000001e82Initial program 94.9%
*-commutative94.9%
associate-/l*98.3%
Applied egg-rr98.3%
Taylor expanded in t around 0 76.8%
*-commutative76.8%
associate-/l*77.7%
Simplified77.7%
Final simplification80.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.95e+36)
(+ x y)
(if (<= t -1.35e-123)
(- x (/ (* z y) t))
(if (<= t 6.8e+82) (+ x (* z (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.95e+36) {
tmp = x + y;
} else if (t <= -1.35e-123) {
tmp = x - ((z * y) / t);
} else if (t <= 6.8e+82) {
tmp = x + (z * (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 (t <= (-1.95d+36)) then
tmp = x + y
else if (t <= (-1.35d-123)) then
tmp = x - ((z * y) / t)
else if (t <= 6.8d+82) then
tmp = x + (z * (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 (t <= -1.95e+36) {
tmp = x + y;
} else if (t <= -1.35e-123) {
tmp = x - ((z * y) / t);
} else if (t <= 6.8e+82) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.95e+36: tmp = x + y elif t <= -1.35e-123: tmp = x - ((z * y) / t) elif t <= 6.8e+82: tmp = x + (z * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.95e+36) tmp = Float64(x + y); elseif (t <= -1.35e-123) tmp = Float64(x - Float64(Float64(z * y) / t)); elseif (t <= 6.8e+82) tmp = Float64(x + Float64(z * 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 (t <= -1.95e+36) tmp = x + y; elseif (t <= -1.35e-123) tmp = x - ((z * y) / t); elseif (t <= 6.8e+82) tmp = x + (z * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.95e+36], N[(x + y), $MachinePrecision], If[LessEqual[t, -1.35e-123], N[(x - N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e+82], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.95 \cdot 10^{+36}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-123}:\\
\;\;\;\;x - \frac{z \cdot y}{t}\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+82}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.9500000000000001e36 or 6.79999999999999989e82 < t Initial program 78.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 85.0%
+-commutative85.0%
Simplified85.0%
if -1.9500000000000001e36 < t < -1.35e-123Initial program 97.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 82.8%
Taylor expanded in a around 0 75.7%
mul-1-neg75.7%
unsub-neg75.7%
associate-/l*75.7%
Simplified75.7%
Taylor expanded in y around 0 75.7%
if -1.35e-123 < t < 6.79999999999999989e82Initial program 94.9%
*-commutative94.9%
associate-/l*98.3%
Applied egg-rr98.3%
Taylor expanded in t around 0 76.8%
*-commutative76.8%
associate-/l*77.7%
Simplified77.7%
Final simplification80.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.8e+36) (not (<= t 9.5e+86))) (+ x y) (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.8e+36) || !(t <= 9.5e+86)) {
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.8d+36)) .or. (.not. (t <= 9.5d+86))) 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.8e+36) || !(t <= 9.5e+86)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.8e+36) or not (t <= 9.5e+86): 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.8e+36) || !(t <= 9.5e+86)) 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.8e+36) || ~((t <= 9.5e+86))) 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.8e+36], N[Not[LessEqual[t, 9.5e+86]], $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.8 \cdot 10^{+36} \lor \neg \left(t \leq 9.5 \cdot 10^{+86}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -1.7999999999999999e36 or 9.50000000000000028e86 < t Initial program 78.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 85.0%
+-commutative85.0%
Simplified85.0%
if -1.7999999999999999e36 < t < 9.50000000000000028e86Initial program 95.7%
associate-/l*94.8%
Simplified94.8%
Taylor expanded in z around inf 86.5%
associate-/l*85.8%
Simplified85.8%
Final simplification85.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.25e+36) (not (<= t 1.75e+87))) (+ x y) (+ x (/ y (/ (- a t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.25e+36) || !(t <= 1.75e+87)) {
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 <= (-2.25d+36)) .or. (.not. (t <= 1.75d+87))) 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 <= -2.25e+36) || !(t <= 1.75e+87)) {
tmp = x + y;
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.25e+36) or not (t <= 1.75e+87): tmp = x + y else: tmp = x + (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.25e+36) || !(t <= 1.75e+87)) 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 <= -2.25e+36) || ~((t <= 1.75e+87))) 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, -2.25e+36], N[Not[LessEqual[t, 1.75e+87]], $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 -2.25 \cdot 10^{+36} \lor \neg \left(t \leq 1.75 \cdot 10^{+87}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if t < -2.24999999999999998e36 or 1.74999999999999993e87 < t Initial program 78.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 85.0%
+-commutative85.0%
Simplified85.0%
if -2.24999999999999998e36 < t < 1.74999999999999993e87Initial program 95.7%
associate-/l*94.8%
Simplified94.8%
clear-num94.8%
un-div-inv94.8%
Applied egg-rr94.8%
Taylor expanded in z around inf 85.8%
Final simplification85.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.6e+34) (not (<= t 3e+84))) (+ x y) (+ x (/ (* z y) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.6e+34) || !(t <= 3e+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 <= (-1.6d+34)) .or. (.not. (t <= 3d+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 <= -1.6e+34) || !(t <= 3e+84)) {
tmp = x + y;
} else {
tmp = x + ((z * y) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.6e+34) or not (t <= 3e+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 <= -1.6e+34) || !(t <= 3e+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 <= -1.6e+34) || ~((t <= 3e+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, -1.6e+34], N[Not[LessEqual[t, 3e+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 -1.6 \cdot 10^{+34} \lor \neg \left(t \leq 3 \cdot 10^{+84}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot y}{a - t}\\
\end{array}
\end{array}
if t < -1.5999999999999999e34 or 2.99999999999999996e84 < t Initial program 78.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 85.0%
+-commutative85.0%
Simplified85.0%
if -1.5999999999999999e34 < t < 2.99999999999999996e84Initial program 95.7%
associate-/l*94.8%
Simplified94.8%
Taylor expanded in z around inf 86.5%
Final simplification85.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.15e+37) (+ x (/ y (/ (- a t) z))) (if (<= z 6.5e+63) (+ x (* t (/ y (- t a)))) (+ x (* y (/ z (- a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+37) {
tmp = x + (y / ((a - t) / z));
} else if (z <= 6.5e+63) {
tmp = x + (t * (y / (t - a)));
} 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 (z <= (-1.15d+37)) then
tmp = x + (y / ((a - t) / z))
else if (z <= 6.5d+63) then
tmp = x + (t * (y / (t - a)))
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 (z <= -1.15e+37) {
tmp = x + (y / ((a - t) / z));
} else if (z <= 6.5e+63) {
tmp = x + (t * (y / (t - a)));
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e+37: tmp = x + (y / ((a - t) / z)) elif z <= 6.5e+63: tmp = x + (t * (y / (t - a))) else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e+37) tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); elseif (z <= 6.5e+63) tmp = Float64(x + Float64(t * Float64(y / Float64(t - a)))); 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 (z <= -1.15e+37) tmp = x + (y / ((a - t) / z)); elseif (z <= 6.5e+63) tmp = x + (t * (y / (t - a))); else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+37], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+63], N[(x + N[(t * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+37}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+63}:\\
\;\;\;\;x + t \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if z < -1.15000000000000001e37Initial program 91.9%
associate-/l*93.9%
Simplified93.9%
clear-num93.9%
un-div-inv94.0%
Applied egg-rr94.0%
Taylor expanded in z around inf 86.4%
if -1.15000000000000001e37 < z < 6.49999999999999992e63Initial program 88.6%
*-commutative88.6%
associate-/l*97.1%
Applied egg-rr97.1%
Taylor expanded in z around 0 78.0%
mul-1-neg78.0%
unsub-neg78.0%
associate-/l*89.3%
Simplified89.3%
if 6.49999999999999992e63 < z Initial program 84.5%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in z around inf 82.2%
associate-/l*90.8%
Simplified90.8%
Final simplification89.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -7.5e-47) (- x (* y (+ (/ z t) -1.0))) (if (<= t 6.8e+82) (+ x (/ (* z y) (- a t))) (+ x (* t (/ y (- t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.5e-47) {
tmp = x - (y * ((z / t) + -1.0));
} else if (t <= 6.8e+82) {
tmp = x + ((z * y) / (a - t));
} else {
tmp = x + (t * (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 (t <= (-7.5d-47)) then
tmp = x - (y * ((z / t) + (-1.0d0)))
else if (t <= 6.8d+82) then
tmp = x + ((z * y) / (a - t))
else
tmp = x + (t * (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 (t <= -7.5e-47) {
tmp = x - (y * ((z / t) + -1.0));
} else if (t <= 6.8e+82) {
tmp = x + ((z * y) / (a - t));
} else {
tmp = x + (t * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7.5e-47: tmp = x - (y * ((z / t) + -1.0)) elif t <= 6.8e+82: tmp = x + ((z * y) / (a - t)) else: tmp = x + (t * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7.5e-47) tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))); elseif (t <= 6.8e+82) tmp = Float64(x + Float64(Float64(z * y) / Float64(a - t))); else tmp = Float64(x + Float64(t * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7.5e-47) tmp = x - (y * ((z / t) + -1.0)); elseif (t <= 6.8e+82) tmp = x + ((z * y) / (a - t)); else tmp = x + (t * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.5e-47], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e+82], N[(x + N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{-47}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+82}:\\
\;\;\;\;x + \frac{z \cdot y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if t < -7.49999999999999969e-47Initial program 87.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 79.2%
mul-1-neg79.2%
unsub-neg79.2%
associate-/l*91.4%
div-sub91.4%
sub-neg91.4%
*-inverses91.4%
metadata-eval91.4%
Simplified91.4%
if -7.49999999999999969e-47 < t < 6.79999999999999989e82Initial program 95.6%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in z around inf 88.7%
if 6.79999999999999989e82 < t Initial program 73.1%
*-commutative73.1%
associate-/l*98.0%
Applied egg-rr98.0%
Taylor expanded in z around 0 71.2%
mul-1-neg71.2%
unsub-neg71.2%
associate-/l*89.0%
Simplified89.0%
Final simplification89.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.1e-46) (- x (* y (+ (/ z t) -1.0))) (if (<= t 6.8e+82) (+ x (/ (* z y) (- a t))) (+ x (* y (/ t (- t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.1e-46) {
tmp = x - (y * ((z / t) + -1.0));
} else if (t <= 6.8e+82) {
tmp = x + ((z * y) / (a - t));
} else {
tmp = x + (y * (t / (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 (t <= (-2.1d-46)) then
tmp = x - (y * ((z / t) + (-1.0d0)))
else if (t <= 6.8d+82) then
tmp = x + ((z * y) / (a - t))
else
tmp = x + (y * (t / (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 (t <= -2.1e-46) {
tmp = x - (y * ((z / t) + -1.0));
} else if (t <= 6.8e+82) {
tmp = x + ((z * y) / (a - t));
} else {
tmp = x + (y * (t / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.1e-46: tmp = x - (y * ((z / t) + -1.0)) elif t <= 6.8e+82: tmp = x + ((z * y) / (a - t)) else: tmp = x + (y * (t / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.1e-46) tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))); elseif (t <= 6.8e+82) tmp = Float64(x + Float64(Float64(z * y) / Float64(a - t))); else tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.1e-46) tmp = x - (y * ((z / t) + -1.0)); elseif (t <= 6.8e+82) tmp = x + ((z * y) / (a - t)); else tmp = x + (y * (t / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.1e-46], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e+82], N[(x + N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{-46}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+82}:\\
\;\;\;\;x + \frac{z \cdot y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\end{array}
\end{array}
if t < -2.09999999999999987e-46Initial program 87.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 79.2%
mul-1-neg79.2%
unsub-neg79.2%
associate-/l*91.4%
div-sub91.4%
sub-neg91.4%
*-inverses91.4%
metadata-eval91.4%
Simplified91.4%
if -2.09999999999999987e-46 < t < 6.79999999999999989e82Initial program 95.6%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in z around inf 88.7%
if 6.79999999999999989e82 < t Initial program 73.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 71.2%
mul-1-neg71.2%
unsub-neg71.2%
*-commutative71.2%
associate-/l*90.9%
Simplified90.9%
Final simplification89.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.9e+32) (not (<= t 7e+82))) (+ x y) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.9e+32) || !(t <= 7e+82)) {
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.9d+32)) .or. (.not. (t <= 7d+82))) 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.9e+32) || !(t <= 7e+82)) {
tmp = x + y;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.9e+32) or not (t <= 7e+82): tmp = x + y else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.9e+32) || !(t <= 7e+82)) 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.9e+32) || ~((t <= 7e+82))) 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.9e+32], N[Not[LessEqual[t, 7e+82]], $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.9 \cdot 10^{+32} \lor \neg \left(t \leq 7 \cdot 10^{+82}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -2.90000000000000003e32 or 7.0000000000000001e82 < t Initial program 78.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 85.0%
+-commutative85.0%
Simplified85.0%
if -2.90000000000000003e32 < t < 7.0000000000000001e82Initial program 95.7%
*-commutative95.7%
associate-/l*98.6%
Applied egg-rr98.6%
Taylor expanded in t around 0 74.0%
*-commutative74.0%
associate-/l*74.0%
Simplified74.0%
Final simplification78.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.1e+34) (not (<= t 6.8e+82))) (+ x y) (+ x (/ (* z y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.1e+34) || !(t <= 6.8e+82)) {
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 <= (-4.1d+34)) .or. (.not. (t <= 6.8d+82))) 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 <= -4.1e+34) || !(t <= 6.8e+82)) {
tmp = x + y;
} else {
tmp = x + ((z * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.1e+34) or not (t <= 6.8e+82): tmp = x + y else: tmp = x + ((z * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.1e+34) || !(t <= 6.8e+82)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(z * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.1e+34) || ~((t <= 6.8e+82))) tmp = x + y; else tmp = x + ((z * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.1e+34], N[Not[LessEqual[t, 6.8e+82]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.1 \cdot 10^{+34} \lor \neg \left(t \leq 6.8 \cdot 10^{+82}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\end{array}
\end{array}
if t < -4.0999999999999998e34 or 6.79999999999999989e82 < t Initial program 78.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 85.0%
+-commutative85.0%
Simplified85.0%
if -4.0999999999999998e34 < t < 6.79999999999999989e82Initial program 95.7%
associate-/l*94.8%
Simplified94.8%
Taylor expanded in t around 0 74.0%
Final simplification78.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.5e-48) (not (<= t 2.9e+41))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.5e-48) || !(t <= 2.9e+41)) {
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.5d-48)) .or. (.not. (t <= 2.9d+41))) 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.5e-48) || !(t <= 2.9e+41)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.5e-48) or not (t <= 2.9e+41): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.5e-48) || !(t <= 2.9e+41)) 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.5e-48) || ~((t <= 2.9e+41))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.5e-48], N[Not[LessEqual[t, 2.9e+41]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-48} \lor \neg \left(t \leq 2.9 \cdot 10^{+41}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.5e-48 or 2.89999999999999988e41 < t Initial program 81.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 78.3%
+-commutative78.3%
Simplified78.3%
if -1.5e-48 < t < 2.89999999999999988e41Initial program 96.2%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in x around inf 56.1%
Final simplification67.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 88.5%
associate-/l*96.9%
Simplified96.9%
Final simplification96.9%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 88.5%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in x around inf 54.0%
Final simplification54.0%
(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 2024084
(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))))