
(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 (+ 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.8%
associate-/l*98.1%
Simplified98.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.5e+117)
(+ x y)
(if (<= t 1.05e-88)
(+ x (* z (/ y a)))
(if (<= t 3.1e+134) (- x (* y (/ z t))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.5e+117) {
tmp = x + y;
} else if (t <= 1.05e-88) {
tmp = x + (z * (y / a));
} else if (t <= 3.1e+134) {
tmp = x - (y * (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 (t <= (-6.5d+117)) then
tmp = x + y
else if (t <= 1.05d-88) then
tmp = x + (z * (y / a))
else if (t <= 3.1d+134) then
tmp = x - (y * (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 (t <= -6.5e+117) {
tmp = x + y;
} else if (t <= 1.05e-88) {
tmp = x + (z * (y / a));
} else if (t <= 3.1e+134) {
tmp = x - (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.5e+117: tmp = x + y elif t <= 1.05e-88: tmp = x + (z * (y / a)) elif t <= 3.1e+134: tmp = x - (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.5e+117) tmp = Float64(x + y); elseif (t <= 1.05e-88) tmp = Float64(x + Float64(z * Float64(y / a))); elseif (t <= 3.1e+134) tmp = Float64(x - Float64(y * 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 (t <= -6.5e+117) tmp = x + y; elseif (t <= 1.05e-88) tmp = x + (z * (y / a)); elseif (t <= 3.1e+134) tmp = x - (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.5e+117], N[(x + y), $MachinePrecision], If[LessEqual[t, 1.05e-88], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e+134], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+117}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-88}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+134}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -6.5000000000000004e117 or 3.09999999999999982e134 < t Initial program 63.7%
+-commutative63.7%
*-commutative63.7%
associate-/l*90.1%
fma-define90.1%
Simplified90.1%
Taylor expanded in t around inf 81.8%
+-commutative81.8%
Simplified81.8%
if -6.5000000000000004e117 < t < 1.05e-88Initial program 93.9%
associate-/l*96.6%
Simplified96.6%
Taylor expanded in t around 0 74.5%
*-commutative74.5%
associate-/l*77.4%
Applied egg-rr77.4%
if 1.05e-88 < t < 3.09999999999999982e134Initial program 97.5%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 90.2%
Taylor expanded in a around 0 81.0%
mul-1-neg81.0%
unsub-neg81.0%
associate-/l*83.5%
Simplified83.5%
Final simplification79.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.3e+128) (not (<= t 1.4e+38))) (+ x (* y (- 1.0 (/ z t)))) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.3e+128) || !(t <= 1.4e+38)) {
tmp = x + (y * (1.0 - (z / t)));
} 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 <= (-3.3d+128)) .or. (.not. (t <= 1.4d+38))) then
tmp = x + (y * (1.0d0 - (z / t)))
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 <= -3.3e+128) || !(t <= 1.4e+38)) {
tmp = x + (y * (1.0 - (z / t)));
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.3e+128) or not (t <= 1.4e+38): tmp = x + (y * (1.0 - (z / t))) else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.3e+128) || !(t <= 1.4e+38)) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(z / t)))); 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 <= -3.3e+128) || ~((t <= 1.4e+38))) tmp = x + (y * (1.0 - (z / t))); else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.3e+128], N[Not[LessEqual[t, 1.4e+38]], $MachinePrecision]], N[(x + N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{+128} \lor \neg \left(t \leq 1.4 \cdot 10^{+38}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -3.3000000000000001e128 or 1.4e38 < t Initial program 69.6%
+-commutative69.6%
*-commutative69.6%
associate-/l*91.4%
fma-define91.4%
Simplified91.4%
Taylor expanded in a around 0 66.2%
mul-1-neg66.2%
unsub-neg66.2%
associate-/l*93.8%
div-sub93.8%
sub-neg93.8%
*-inverses93.8%
metadata-eval93.8%
Simplified93.8%
if -3.3000000000000001e128 < t < 1.4e38Initial program 93.8%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in z around inf 88.1%
*-commutative88.1%
associate-/l*90.9%
Applied egg-rr90.9%
Final simplification91.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.8e+193) (not (<= t 5.7e+134))) (+ x y) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.8e+193) || !(t <= 5.7e+134)) {
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 <= (-4.8d+193)) .or. (.not. (t <= 5.7d+134))) 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 <= -4.8e+193) || !(t <= 5.7e+134)) {
tmp = x + y;
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.8e+193) or not (t <= 5.7e+134): tmp = x + y else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.8e+193) || !(t <= 5.7e+134)) 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 <= -4.8e+193) || ~((t <= 5.7e+134))) 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, -4.8e+193], N[Not[LessEqual[t, 5.7e+134]], $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 -4.8 \cdot 10^{+193} \lor \neg \left(t \leq 5.7 \cdot 10^{+134}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -4.8e193 or 5.70000000000000038e134 < t Initial program 61.5%
+-commutative61.5%
*-commutative61.5%
associate-/l*91.0%
fma-define91.0%
Simplified91.0%
Taylor expanded in t around inf 89.5%
+-commutative89.5%
Simplified89.5%
if -4.8e193 < t < 5.70000000000000038e134Initial program 93.1%
associate-/l*97.5%
Simplified97.5%
Taylor expanded in z around inf 85.7%
*-commutative85.7%
associate-/l*88.2%
Applied egg-rr88.2%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -9e+123) (+ x (* y (/ t (- t a)))) (if (<= t 2.95e+38) (+ 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 <= -9e+123) {
tmp = x + (y * (t / (t - a)));
} else if (t <= 2.95e+38) {
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 <= (-9d+123)) then
tmp = x + (y * (t / (t - a)))
else if (t <= 2.95d+38) 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 <= -9e+123) {
tmp = x + (y * (t / (t - a)));
} else if (t <= 2.95e+38) {
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 <= -9e+123: tmp = x + (y * (t / (t - a))) elif t <= 2.95e+38: 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 <= -9e+123) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); elseif (t <= 2.95e+38) tmp = Float64(x + Float64(z * Float64(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 <= -9e+123) tmp = x + (y * (t / (t - a))); elseif (t <= 2.95e+38) 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, -9e+123], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.95e+38], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $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 -9 \cdot 10^{+123}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{+38}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{t}\right)\\
\end{array}
\end{array}
if t < -8.99999999999999965e123Initial program 62.3%
+-commutative62.3%
*-commutative62.3%
associate-/l*93.5%
fma-define93.5%
Simplified93.5%
Taylor expanded in z around 0 59.2%
mul-1-neg59.2%
unsub-neg59.2%
*-commutative59.2%
*-lft-identity59.2%
times-frac88.0%
/-rgt-identity88.0%
Simplified88.0%
if -8.99999999999999965e123 < t < 2.94999999999999991e38Initial program 94.3%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in z around inf 88.6%
*-commutative88.6%
associate-/l*91.4%
Applied egg-rr91.4%
if 2.94999999999999991e38 < t Initial program 72.4%
+-commutative72.4%
*-commutative72.4%
associate-/l*90.3%
fma-define90.3%
Simplified90.3%
Taylor expanded in a around 0 68.8%
mul-1-neg68.8%
unsub-neg68.8%
associate-/l*96.3%
div-sub96.3%
sub-neg96.3%
*-inverses96.3%
metadata-eval96.3%
Simplified96.3%
Final simplification92.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.45e+117) (not (<= t 9.5e+36))) (+ x y) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.45e+117) || !(t <= 9.5e+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.45d+117)) .or. (.not. (t <= 9.5d+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.45e+117) || !(t <= 9.5e+36)) {
tmp = x + y;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.45e+117) or not (t <= 9.5e+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.45e+117) || !(t <= 9.5e+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.45e+117) || ~((t <= 9.5e+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.45e+117], N[Not[LessEqual[t, 9.5e+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.45 \cdot 10^{+117} \lor \neg \left(t \leq 9.5 \cdot 10^{+36}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -2.45e117 or 9.49999999999999974e36 < t Initial program 68.1%
+-commutative68.1%
*-commutative68.1%
associate-/l*91.6%
fma-define91.6%
Simplified91.6%
Taylor expanded in t around inf 79.0%
+-commutative79.0%
Simplified79.0%
if -2.45e117 < t < 9.49999999999999974e36Initial program 94.8%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in t around 0 72.4%
*-commutative72.4%
associate-/l*74.8%
Applied egg-rr74.8%
Final simplification76.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.4e+56) (not (<= y 1.15e+121))) (* y (- 1.0 (/ z t))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.4e+56) || !(y <= 1.15e+121)) {
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 ((y <= (-3.4d+56)) .or. (.not. (y <= 1.15d+121))) 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 ((y <= -3.4e+56) || !(y <= 1.15e+121)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.4e+56) or not (y <= 1.15e+121): tmp = y * (1.0 - (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.4e+56) || !(y <= 1.15e+121)) 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 ((y <= -3.4e+56) || ~((y <= 1.15e+121))) tmp = y * (1.0 - (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.4e+56], N[Not[LessEqual[y, 1.15e+121]], $MachinePrecision]], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+56} \lor \neg \left(y \leq 1.15 \cdot 10^{+121}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < -3.40000000000000001e56 or 1.1499999999999999e121 < y Initial program 69.8%
associate-/l*98.0%
Simplified98.0%
clear-num97.9%
un-div-inv98.0%
Applied egg-rr98.0%
Taylor expanded in a around 0 41.2%
mul-1-neg41.2%
unsub-neg41.2%
associate-/l*60.5%
div-sub60.5%
*-inverses60.5%
Simplified60.5%
Taylor expanded in x around 0 52.0%
sub-neg52.0%
metadata-eval52.0%
neg-mul-152.0%
distribute-rgt-neg-out52.0%
+-commutative52.0%
distribute-neg-in52.0%
metadata-eval52.0%
sub-neg52.0%
Simplified52.0%
if -3.40000000000000001e56 < y < 1.1499999999999999e121Initial program 96.1%
+-commutative96.1%
*-commutative96.1%
associate-/l*94.1%
fma-define94.1%
Simplified94.1%
Taylor expanded in t around inf 69.4%
+-commutative69.4%
Simplified69.4%
Final simplification62.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.35e+121) (not (<= z 5e+223))) (/ (* y (- z)) t) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.35e+121) || !(z <= 5e+223)) {
tmp = (y * -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 ((z <= (-1.35d+121)) .or. (.not. (z <= 5d+223))) then
tmp = (y * -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 ((z <= -1.35e+121) || !(z <= 5e+223)) {
tmp = (y * -z) / t;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.35e+121) or not (z <= 5e+223): tmp = (y * -z) / t else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.35e+121) || !(z <= 5e+223)) tmp = Float64(Float64(y * 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 ((z <= -1.35e+121) || ~((z <= 5e+223))) tmp = (y * -z) / t; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.35e+121], N[Not[LessEqual[z, 5e+223]], $MachinePrecision]], N[(N[(y * (-z)), $MachinePrecision] / t), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+121} \lor \neg \left(z \leq 5 \cdot 10^{+223}\right):\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.3500000000000001e121 or 4.99999999999999985e223 < z Initial program 84.2%
associate-/l*96.4%
Simplified96.4%
clear-num96.4%
un-div-inv96.5%
Applied egg-rr96.5%
Taylor expanded in a around 0 56.9%
mul-1-neg56.9%
unsub-neg56.9%
associate-/l*62.0%
div-sub62.0%
*-inverses62.0%
Simplified62.0%
Taylor expanded in z around inf 49.5%
associate-*r/49.5%
neg-mul-149.5%
distribute-rgt-neg-in49.5%
Simplified49.5%
if -1.3500000000000001e121 < z < 4.99999999999999985e223Initial program 86.3%
+-commutative86.3%
*-commutative86.3%
associate-/l*96.2%
fma-define96.2%
Simplified96.2%
Taylor expanded in t around inf 63.0%
+-commutative63.0%
Simplified63.0%
Final simplification60.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.35e+121) (not (<= z 1.95e+226))) (* y (/ z (- t))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.35e+121) || !(z <= 1.95e+226)) {
tmp = y * (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 ((z <= (-1.35d+121)) .or. (.not. (z <= 1.95d+226))) then
tmp = y * (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 ((z <= -1.35e+121) || !(z <= 1.95e+226)) {
tmp = y * (z / -t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.35e+121) or not (z <= 1.95e+226): tmp = y * (z / -t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.35e+121) || !(z <= 1.95e+226)) tmp = Float64(y * Float64(z / Float64(-t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.35e+121) || ~((z <= 1.95e+226))) tmp = y * (z / -t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.35e+121], N[Not[LessEqual[z, 1.95e+226]], $MachinePrecision]], N[(y * N[(z / (-t)), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+121} \lor \neg \left(z \leq 1.95 \cdot 10^{+226}\right):\\
\;\;\;\;y \cdot \frac{z}{-t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.3500000000000001e121 or 1.94999999999999992e226 < z Initial program 84.2%
associate-/l*96.4%
Simplified96.4%
clear-num96.4%
un-div-inv96.5%
Applied egg-rr96.5%
Taylor expanded in a around 0 56.9%
mul-1-neg56.9%
unsub-neg56.9%
associate-/l*62.0%
div-sub62.0%
*-inverses62.0%
Simplified62.0%
Taylor expanded in z around inf 49.5%
mul-1-neg49.5%
associate-*r/49.4%
distribute-rgt-neg-in49.4%
distribute-frac-neg249.4%
Simplified49.4%
if -1.3500000000000001e121 < z < 1.94999999999999992e226Initial program 86.3%
+-commutative86.3%
*-commutative86.3%
associate-/l*96.2%
fma-define96.2%
Simplified96.2%
Taylor expanded in t around inf 63.0%
+-commutative63.0%
Simplified63.0%
Final simplification60.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.6e+95) x (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.6e+95) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5.6d+95)) then
tmp = x
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.6e+95) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.6e+95: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.6e+95) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.6e+95) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.6e+95], x, N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.6 \cdot 10^{+95}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -5.5999999999999995e95Initial program 81.9%
+-commutative81.9%
*-commutative81.9%
associate-/l*95.9%
fma-define95.9%
Simplified95.9%
Taylor expanded in y around 0 61.1%
if -5.5999999999999995e95 < a Initial program 86.6%
+-commutative86.6%
*-commutative86.6%
associate-/l*95.1%
fma-define95.1%
Simplified95.1%
Taylor expanded in t around inf 55.2%
+-commutative55.2%
Simplified55.2%
Final simplification56.2%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.15e+268) x y))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.15e+268) {
tmp = x;
} else {
tmp = 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.15d+268) then
tmp = x
else
tmp = 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.15e+268) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.15e+268: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.15e+268) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.15e+268) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.15e+268], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.15 \cdot 10^{+268}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < 1.15000000000000006e268Initial program 87.4%
+-commutative87.4%
*-commutative87.4%
associate-/l*95.5%
fma-define95.5%
Simplified95.5%
Taylor expanded in y around 0 47.1%
if 1.15000000000000006e268 < t Initial program 20.7%
+-commutative20.7%
*-commutative20.7%
associate-/l*86.4%
fma-define86.4%
Simplified86.4%
Taylor expanded in t around inf 100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 100.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 85.8%
+-commutative85.8%
*-commutative85.8%
associate-/l*95.2%
fma-define95.2%
Simplified95.2%
Taylor expanded in y around 0 46.1%
(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 2024185
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (+ x (/ y (/ (- a t) (- z t)))))
(+ x (/ (* y (- z t)) (- a t))))