
(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}
Sampling outcomes in binary64 precision:
Herbie found 13 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(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}
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (- z t) (- a t)))) (if (<= t_1 4e+269) (+ x (* t_1 y)) (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double tmp;
if (t_1 <= 4e+269) {
tmp = x + (t_1 * y);
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = (z - t) / (a - t)
if (t_1 <= 4d+269) then
tmp = x + (t_1 * y)
else
tmp = 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 t_1 = (z - t) / (a - t);
double tmp;
if (t_1 <= 4e+269) {
tmp = x + (t_1 * y);
} else {
tmp = z * (y / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (a - t) tmp = 0 if t_1 <= 4e+269: tmp = x + (t_1 * y) else: tmp = z * (y / (a - t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) tmp = 0.0 if (t_1 <= 4e+269) tmp = Float64(x + Float64(t_1 * y)); else tmp = Float64(z * Float64(y / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (a - t); tmp = 0.0; if (t_1 <= 4e+269) tmp = x + (t_1 * y); else tmp = z * (y / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 4e+269], N[(x + N[(t$95$1 * y), $MachinePrecision]), $MachinePrecision], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
\mathbf{if}\;t_1 \leq 4 \cdot 10^{+269}:\\
\;\;\;\;x + t_1 \cdot y\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < 4.0000000000000002e269Initial program 99.5%
if 4.0000000000000002e269 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 37.9%
associate-*r/99.5%
*-commutative99.5%
associate-/l*99.5%
Applied egg-rr99.5%
Taylor expanded in z around inf 99.5%
Taylor expanded in x around 0 99.5%
*-commutative99.5%
associate-*r/99.7%
Simplified99.7%
Final simplification99.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -4.6e+137)
(+ x y)
(if (<= t -2.4e-84)
(- x (* y (/ z t)))
(if (<= t 9e-98)
(+ x (/ (* z y) a))
(if (<= t 1.15e-36) (* (- t z) (/ y (- t a))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.6e+137) {
tmp = x + y;
} else if (t <= -2.4e-84) {
tmp = x - (y * (z / t));
} else if (t <= 9e-98) {
tmp = x + ((z * y) / a);
} else if (t <= 1.15e-36) {
tmp = (t - z) * (y / (t - 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 <= (-4.6d+137)) then
tmp = x + y
else if (t <= (-2.4d-84)) then
tmp = x - (y * (z / t))
else if (t <= 9d-98) then
tmp = x + ((z * y) / a)
else if (t <= 1.15d-36) then
tmp = (t - z) * (y / (t - 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 <= -4.6e+137) {
tmp = x + y;
} else if (t <= -2.4e-84) {
tmp = x - (y * (z / t));
} else if (t <= 9e-98) {
tmp = x + ((z * y) / a);
} else if (t <= 1.15e-36) {
tmp = (t - z) * (y / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.6e+137: tmp = x + y elif t <= -2.4e-84: tmp = x - (y * (z / t)) elif t <= 9e-98: tmp = x + ((z * y) / a) elif t <= 1.15e-36: tmp = (t - z) * (y / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.6e+137) tmp = Float64(x + y); elseif (t <= -2.4e-84) tmp = Float64(x - Float64(y * Float64(z / t))); elseif (t <= 9e-98) tmp = Float64(x + Float64(Float64(z * y) / a)); elseif (t <= 1.15e-36) tmp = Float64(Float64(t - z) * Float64(y / Float64(t - a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.6e+137) tmp = x + y; elseif (t <= -2.4e-84) tmp = x - (y * (z / t)); elseif (t <= 9e-98) tmp = x + ((z * y) / a); elseif (t <= 1.15e-36) tmp = (t - z) * (y / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.6e+137], N[(x + y), $MachinePrecision], If[LessEqual[t, -2.4e-84], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e-98], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e-36], N[(N[(t - z), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+137}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-84}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-98}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-36}:\\
\;\;\;\;\left(t - z\right) \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -4.59999999999999999e137 or 1.14999999999999998e-36 < t Initial program 99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l/74.7%
sub-neg74.7%
+-commutative74.7%
neg-sub074.7%
associate-+l-74.7%
sub0-neg74.7%
neg-mul-174.7%
times-frac94.7%
fma-def94.7%
sub-neg94.7%
+-commutative94.7%
neg-sub094.7%
associate-+l-94.7%
sub0-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.7%
metadata-eval94.7%
/-rgt-identity94.7%
Simplified94.7%
Taylor expanded in t around inf 84.4%
if -4.59999999999999999e137 < t < -2.40000000000000017e-84Initial program 99.9%
associate-*r/92.5%
*-commutative92.5%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 82.9%
Taylor expanded in a around 0 73.9%
+-commutative73.9%
mul-1-neg73.9%
associate-*r/77.6%
unsub-neg77.6%
Simplified77.6%
if -2.40000000000000017e-84 < t < 8.99999999999999994e-98Initial program 93.4%
+-commutative93.4%
*-commutative93.4%
associate-*l/98.2%
sub-neg98.2%
+-commutative98.2%
neg-sub098.2%
associate-+l-98.2%
sub0-neg98.2%
neg-mul-198.2%
times-frac96.1%
fma-def96.1%
sub-neg96.1%
+-commutative96.1%
neg-sub096.1%
associate-+l-96.1%
sub0-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.1%
metadata-eval96.1%
/-rgt-identity96.1%
Simplified96.1%
Taylor expanded in t around 0 81.5%
if 8.99999999999999994e-98 < t < 1.14999999999999998e-36Initial program 85.2%
+-commutative85.2%
*-commutative85.2%
associate-*l/85.0%
sub-neg85.0%
+-commutative85.0%
neg-sub085.0%
associate-+l-85.0%
sub0-neg85.0%
neg-mul-185.0%
times-frac99.5%
fma-def99.5%
sub-neg99.5%
+-commutative99.5%
neg-sub099.5%
associate-+l-99.5%
sub0-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.5%
metadata-eval99.5%
/-rgt-identity99.5%
Simplified99.5%
Taylor expanded in y around -inf 75.3%
*-commutative75.3%
associate-*r/89.9%
Simplified89.9%
Final simplification82.5%
(FPCore (x y z t a)
:precision binary64
(if (or (<= z -8.4e+257)
(and (not (<= z -6.5e+213))
(or (<= z -6.8e+138) (not (<= z 6.6e+205)))))
(* z (/ y (- a t)))
(+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.4e+257) || (!(z <= -6.5e+213) && ((z <= -6.8e+138) || !(z <= 6.6e+205)))) {
tmp = z * (y / (a - 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 <= (-8.4d+257)) .or. (.not. (z <= (-6.5d+213))) .and. (z <= (-6.8d+138)) .or. (.not. (z <= 6.6d+205))) then
tmp = z * (y / (a - 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 <= -8.4e+257) || (!(z <= -6.5e+213) && ((z <= -6.8e+138) || !(z <= 6.6e+205)))) {
tmp = z * (y / (a - t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.4e+257) or (not (z <= -6.5e+213) and ((z <= -6.8e+138) or not (z <= 6.6e+205))): tmp = z * (y / (a - t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.4e+257) || (!(z <= -6.5e+213) && ((z <= -6.8e+138) || !(z <= 6.6e+205)))) tmp = Float64(z * Float64(y / Float64(a - t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.4e+257) || (~((z <= -6.5e+213)) && ((z <= -6.8e+138) || ~((z <= 6.6e+205))))) tmp = z * (y / (a - t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.4e+257], And[N[Not[LessEqual[z, -6.5e+213]], $MachinePrecision], Or[LessEqual[z, -6.8e+138], N[Not[LessEqual[z, 6.6e+205]], $MachinePrecision]]]], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.4 \cdot 10^{+257} \lor \neg \left(z \leq -6.5 \cdot 10^{+213}\right) \land \left(z \leq -6.8 \cdot 10^{+138} \lor \neg \left(z \leq 6.6 \cdot 10^{+205}\right)\right):\\
\;\;\;\;z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -8.40000000000000052e257 or -6.49999999999999982e213 < z < -6.80000000000000022e138 or 6.6000000000000004e205 < z Initial program 88.6%
associate-*r/79.4%
*-commutative79.4%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 79.1%
Taylor expanded in x around 0 58.3%
*-commutative58.3%
associate-*r/75.1%
Simplified75.1%
if -8.40000000000000052e257 < z < -6.49999999999999982e213 or -6.80000000000000022e138 < z < 6.6000000000000004e205Initial program 99.4%
+-commutative99.4%
*-commutative99.4%
associate-*l/86.9%
sub-neg86.9%
+-commutative86.9%
neg-sub086.9%
associate-+l-86.9%
sub0-neg86.9%
neg-mul-186.9%
times-frac95.5%
fma-def95.5%
sub-neg95.5%
+-commutative95.5%
neg-sub095.5%
associate-+l-95.5%
sub0-neg95.5%
neg-mul-195.5%
*-commutative95.5%
associate-/l*95.5%
metadata-eval95.5%
/-rgt-identity95.5%
Simplified95.5%
Taylor expanded in t around inf 71.8%
Final simplification72.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.42e+137)
(+ x y)
(if (<= t -7.5e-43)
(- x (* y (/ z t)))
(if (<= t 4.4e-35) (+ x (/ y (/ a z))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.42e+137) {
tmp = x + y;
} else if (t <= -7.5e-43) {
tmp = x - (y * (z / t));
} else if (t <= 4.4e-35) {
tmp = x + (y / (a / z));
} 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.42d+137)) then
tmp = x + y
else if (t <= (-7.5d-43)) then
tmp = x - (y * (z / t))
else if (t <= 4.4d-35) then
tmp = x + (y / (a / z))
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.42e+137) {
tmp = x + y;
} else if (t <= -7.5e-43) {
tmp = x - (y * (z / t));
} else if (t <= 4.4e-35) {
tmp = x + (y / (a / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.42e+137: tmp = x + y elif t <= -7.5e-43: tmp = x - (y * (z / t)) elif t <= 4.4e-35: tmp = x + (y / (a / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.42e+137) tmp = Float64(x + y); elseif (t <= -7.5e-43) tmp = Float64(x - Float64(y * Float64(z / t))); elseif (t <= 4.4e-35) tmp = Float64(x + Float64(y / Float64(a / z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.42e+137) tmp = x + y; elseif (t <= -7.5e-43) tmp = x - (y * (z / t)); elseif (t <= 4.4e-35) tmp = x + (y / (a / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.42e+137], N[(x + y), $MachinePrecision], If[LessEqual[t, -7.5e-43], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e-35], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.42 \cdot 10^{+137}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-43}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-35}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.42e137 or 4.39999999999999987e-35 < t Initial program 99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l/74.7%
sub-neg74.7%
+-commutative74.7%
neg-sub074.7%
associate-+l-74.7%
sub0-neg74.7%
neg-mul-174.7%
times-frac94.7%
fma-def94.7%
sub-neg94.7%
+-commutative94.7%
neg-sub094.7%
associate-+l-94.7%
sub0-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.7%
metadata-eval94.7%
/-rgt-identity94.7%
Simplified94.7%
Taylor expanded in t around inf 84.4%
if -1.42e137 < t < -7.50000000000000068e-43Initial program 99.8%
associate-*r/93.1%
*-commutative93.1%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 81.5%
Taylor expanded in a around 0 74.0%
+-commutative74.0%
mul-1-neg74.0%
associate-*r/78.5%
unsub-neg78.5%
Simplified78.5%
if -7.50000000000000068e-43 < t < 4.39999999999999987e-35Initial program 92.9%
+-commutative92.9%
*-commutative92.9%
associate-*l/95.6%
sub-neg95.6%
+-commutative95.6%
neg-sub095.6%
associate-+l-95.6%
sub0-neg95.6%
neg-mul-195.6%
times-frac96.9%
fma-def96.9%
sub-neg96.9%
+-commutative96.9%
neg-sub096.9%
associate-+l-96.9%
sub0-neg96.9%
neg-mul-196.9%
*-commutative96.9%
associate-/l*96.9%
metadata-eval96.9%
/-rgt-identity96.9%
Simplified96.9%
Taylor expanded in t around 0 74.9%
associate-/l*76.8%
Simplified76.8%
Final simplification80.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.45e-28) (not (<= x 1.6e-99))) (+ x (* y (/ z (- a t)))) (* (- t z) (/ y (- t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.45e-28) || !(x <= 1.6e-99)) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = (t - z) * (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 ((x <= (-1.45d-28)) .or. (.not. (x <= 1.6d-99))) then
tmp = x + (y * (z / (a - t)))
else
tmp = (t - z) * (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 ((x <= -1.45e-28) || !(x <= 1.6e-99)) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = (t - z) * (y / (t - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.45e-28) or not (x <= 1.6e-99): tmp = x + (y * (z / (a - t))) else: tmp = (t - z) * (y / (t - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.45e-28) || !(x <= 1.6e-99)) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(Float64(t - z) * Float64(y / Float64(t - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.45e-28) || ~((x <= 1.6e-99))) tmp = x + (y * (z / (a - t))); else tmp = (t - z) * (y / (t - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.45e-28], N[Not[LessEqual[x, 1.6e-99]], $MachinePrecision]], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - z), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-28} \lor \neg \left(x \leq 1.6 \cdot 10^{-99}\right):\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;\left(t - z\right) \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if x < -1.45000000000000006e-28 or 1.6e-99 < x Initial program 97.0%
Taylor expanded in z around inf 87.5%
if -1.45000000000000006e-28 < x < 1.6e-99Initial program 97.8%
+-commutative97.8%
*-commutative97.8%
associate-*l/75.1%
sub-neg75.1%
+-commutative75.1%
neg-sub075.1%
associate-+l-75.1%
sub0-neg75.1%
neg-mul-175.1%
times-frac92.5%
fma-def92.5%
sub-neg92.5%
+-commutative92.5%
neg-sub092.5%
associate-+l-92.5%
sub0-neg92.5%
neg-mul-192.5%
*-commutative92.5%
associate-/l*92.5%
metadata-eval92.5%
/-rgt-identity92.5%
Simplified92.5%
Taylor expanded in y around -inf 63.5%
*-commutative63.5%
associate-*r/81.1%
Simplified81.1%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.42e+20) (not (<= z 7.6e-56))) (+ x (* y (/ z (- a t)))) (+ x (/ y (/ (- t a) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.42e+20) || !(z <= 7.6e-56)) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = x + (y / ((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 <= (-1.42d+20)) .or. (.not. (z <= 7.6d-56))) then
tmp = x + (y * (z / (a - t)))
else
tmp = x + (y / ((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 <= -1.42e+20) || !(z <= 7.6e-56)) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = x + (y / ((t - a) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.42e+20) or not (z <= 7.6e-56): tmp = x + (y * (z / (a - t))) else: tmp = x + (y / ((t - a) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.42e+20) || !(z <= 7.6e-56)) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(x + Float64(y / Float64(Float64(t - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.42e+20) || ~((z <= 7.6e-56))) tmp = x + (y * (z / (a - t))); else tmp = x + (y / ((t - a) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.42e+20], N[Not[LessEqual[z, 7.6e-56]], $MachinePrecision]], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(t - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.42 \cdot 10^{+20} \lor \neg \left(z \leq 7.6 \cdot 10^{-56}\right):\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t - a}{t}}\\
\end{array}
\end{array}
if z < -1.42e20 or 7.6000000000000004e-56 < z Initial program 95.0%
Taylor expanded in z around inf 85.2%
if -1.42e20 < z < 7.6000000000000004e-56Initial program 99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l/85.5%
sub-neg85.5%
+-commutative85.5%
neg-sub085.5%
associate-+l-85.5%
sub0-neg85.5%
neg-mul-185.5%
times-frac94.7%
fma-def94.6%
sub-neg94.6%
+-commutative94.6%
neg-sub094.6%
associate-+l-94.6%
sub0-neg94.6%
neg-mul-194.6%
*-commutative94.6%
associate-/l*94.6%
metadata-eval94.6%
/-rgt-identity94.6%
Simplified94.6%
Taylor expanded in z around 0 77.9%
+-commutative77.9%
associate-/l*92.3%
Simplified92.3%
Final simplification88.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -9.5e+39) (+ x y) (if (<= t 3.1e-35) (+ x (* y (/ z a))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.5e+39) {
tmp = x + y;
} else if (t <= 3.1e-35) {
tmp = x + (y * (z / 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 <= (-9.5d+39)) then
tmp = x + y
else if (t <= 3.1d-35) then
tmp = x + (y * (z / 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 <= -9.5e+39) {
tmp = x + y;
} else if (t <= 3.1e-35) {
tmp = x + (y * (z / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9.5e+39: tmp = x + y elif t <= 3.1e-35: tmp = x + (y * (z / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.5e+39) tmp = Float64(x + y); elseif (t <= 3.1e-35) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9.5e+39) tmp = x + y; elseif (t <= 3.1e-35) tmp = x + (y * (z / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.5e+39], N[(x + y), $MachinePrecision], If[LessEqual[t, 3.1e-35], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+39}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-35}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -9.50000000000000011e39 or 3.10000000000000012e-35 < t Initial program 99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l/77.1%
sub-neg77.1%
+-commutative77.1%
neg-sub077.1%
associate-+l-77.1%
sub0-neg77.1%
neg-mul-177.1%
times-frac95.4%
fma-def95.4%
sub-neg95.4%
+-commutative95.4%
neg-sub095.4%
associate-+l-95.4%
sub0-neg95.4%
neg-mul-195.4%
*-commutative95.4%
associate-/l*95.4%
metadata-eval95.4%
/-rgt-identity95.4%
Simplified95.4%
Taylor expanded in t around inf 80.1%
if -9.50000000000000011e39 < t < 3.10000000000000012e-35Initial program 94.1%
Taylor expanded in t around 0 74.9%
Final simplification77.7%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.15e+40) (+ x y) (if (<= t 1.75e-34) (+ x (/ y (/ a z))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.15e+40) {
tmp = x + y;
} else if (t <= 1.75e-34) {
tmp = x + (y / (a / z));
} 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.15d+40)) then
tmp = x + y
else if (t <= 1.75d-34) then
tmp = x + (y / (a / z))
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.15e+40) {
tmp = x + y;
} else if (t <= 1.75e-34) {
tmp = x + (y / (a / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.15e+40: tmp = x + y elif t <= 1.75e-34: tmp = x + (y / (a / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.15e+40) tmp = Float64(x + y); elseif (t <= 1.75e-34) tmp = Float64(x + Float64(y / Float64(a / z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.15e+40) tmp = x + y; elseif (t <= 1.75e-34) tmp = x + (y / (a / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.15e+40], N[(x + y), $MachinePrecision], If[LessEqual[t, 1.75e-34], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+40}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-34}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.14999999999999997e40 or 1.75e-34 < t Initial program 99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l/77.1%
sub-neg77.1%
+-commutative77.1%
neg-sub077.1%
associate-+l-77.1%
sub0-neg77.1%
neg-mul-177.1%
times-frac95.4%
fma-def95.4%
sub-neg95.4%
+-commutative95.4%
neg-sub095.4%
associate-+l-95.4%
sub0-neg95.4%
neg-mul-195.4%
*-commutative95.4%
associate-/l*95.4%
metadata-eval95.4%
/-rgt-identity95.4%
Simplified95.4%
Taylor expanded in t around inf 80.1%
if -1.14999999999999997e40 < t < 1.75e-34Initial program 94.1%
+-commutative94.1%
*-commutative94.1%
associate-*l/95.5%
sub-neg95.5%
+-commutative95.5%
neg-sub095.5%
associate-+l-95.5%
sub0-neg95.5%
neg-mul-195.5%
times-frac97.4%
fma-def97.4%
sub-neg97.4%
+-commutative97.4%
neg-sub097.4%
associate-+l-97.4%
sub0-neg97.4%
neg-mul-197.4%
*-commutative97.4%
associate-/l*97.4%
metadata-eval97.4%
/-rgt-identity97.4%
Simplified97.4%
Taylor expanded in t around 0 72.5%
associate-/l*74.9%
Simplified74.9%
Final simplification77.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.38e+281) (not (<= z 2.5e+218))) (* z (/ y a)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.38e+281) || !(z <= 2.5e+218)) {
tmp = 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 ((z <= (-1.38d+281)) .or. (.not. (z <= 2.5d+218))) then
tmp = 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 ((z <= -1.38e+281) || !(z <= 2.5e+218)) {
tmp = z * (y / a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.38e+281) or not (z <= 2.5e+218): tmp = z * (y / a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.38e+281) || !(z <= 2.5e+218)) tmp = 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 ((z <= -1.38e+281) || ~((z <= 2.5e+218))) tmp = z * (y / a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.38e+281], N[Not[LessEqual[z, 2.5e+218]], $MachinePrecision]], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.38 \cdot 10^{+281} \lor \neg \left(z \leq 2.5 \cdot 10^{+218}\right):\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.38000000000000008e281 or 2.49999999999999991e218 < z Initial program 96.7%
+-commutative96.7%
*-commutative96.7%
associate-*l/77.4%
sub-neg77.4%
+-commutative77.4%
neg-sub077.4%
associate-+l-77.4%
sub0-neg77.4%
neg-mul-177.4%
times-frac99.9%
fma-def99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
metadata-eval99.9%
/-rgt-identity99.9%
Simplified99.9%
Taylor expanded in t around 0 67.2%
Taylor expanded in y around inf 50.5%
associate-*l/61.6%
*-commutative61.6%
Simplified61.6%
if -1.38000000000000008e281 < z < 2.49999999999999991e218Initial program 97.4%
+-commutative97.4%
*-commutative97.4%
associate-*l/86.5%
sub-neg86.5%
+-commutative86.5%
neg-sub086.5%
associate-+l-86.5%
sub0-neg86.5%
neg-mul-186.5%
times-frac95.9%
fma-def95.9%
sub-neg95.9%
+-commutative95.9%
neg-sub095.9%
associate-+l-95.9%
sub0-neg95.9%
neg-mul-195.9%
*-commutative95.9%
associate-/l*95.9%
metadata-eval95.9%
/-rgt-identity95.9%
Simplified95.9%
Taylor expanded in t around inf 68.0%
Final simplification67.3%
(FPCore (x y z t a) :precision binary64 (if (<= z 2.7e+218) (+ x y) (* y (/ z a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 2.7e+218) {
tmp = x + y;
} else {
tmp = 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 (z <= 2.7d+218) then
tmp = x + y
else
tmp = 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 (z <= 2.7e+218) {
tmp = x + y;
} else {
tmp = y * (z / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 2.7e+218: tmp = x + y else: tmp = y * (z / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 2.7e+218) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 2.7e+218) tmp = x + y; else tmp = y * (z / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 2.7e+218], N[(x + y), $MachinePrecision], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.7 \cdot 10^{+218}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if z < 2.70000000000000013e218Initial program 97.1%
+-commutative97.1%
*-commutative97.1%
associate-*l/85.7%
sub-neg85.7%
+-commutative85.7%
neg-sub085.7%
associate-+l-85.7%
sub0-neg85.7%
neg-mul-185.7%
times-frac96.0%
fma-def96.0%
sub-neg96.0%
+-commutative96.0%
neg-sub096.0%
associate-+l-96.0%
sub0-neg96.0%
neg-mul-196.0%
*-commutative96.0%
associate-/l*96.0%
metadata-eval96.0%
/-rgt-identity96.0%
Simplified96.0%
Taylor expanded in t around inf 66.5%
if 2.70000000000000013e218 < z Initial program 99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l/83.0%
sub-neg83.0%
+-commutative83.0%
neg-sub083.0%
associate-+l-83.0%
sub0-neg83.0%
neg-mul-183.0%
times-frac99.9%
fma-def99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
metadata-eval99.9%
/-rgt-identity99.9%
Simplified99.9%
Taylor expanded in t around 0 69.5%
Taylor expanded in y around inf 51.8%
associate-*r/53.6%
Simplified53.6%
Final simplification65.4%
(FPCore (x y z t a) :precision binary64 (if (<= x -7.6e-76) x (if (<= x 2.9e-98) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -7.6e-76) {
tmp = x;
} else if (x <= 2.9e-98) {
tmp = 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 (x <= (-7.6d-76)) then
tmp = x
else if (x <= 2.9d-98) then
tmp = 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 (x <= -7.6e-76) {
tmp = x;
} else if (x <= 2.9e-98) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -7.6e-76: tmp = x elif x <= 2.9e-98: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -7.6e-76) tmp = x; elseif (x <= 2.9e-98) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -7.6e-76) tmp = x; elseif (x <= 2.9e-98) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -7.6e-76], x, If[LessEqual[x, 2.9e-98], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.6 \cdot 10^{-76}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-98}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -7.6000000000000004e-76 or 2.9e-98 < x Initial program 97.1%
+-commutative97.1%
*-commutative97.1%
associate-*l/89.5%
sub-neg89.5%
+-commutative89.5%
neg-sub089.5%
associate-+l-89.5%
sub0-neg89.5%
neg-mul-189.5%
times-frac98.6%
fma-def98.5%
sub-neg98.5%
+-commutative98.5%
neg-sub098.5%
associate-+l-98.5%
sub0-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.5%
metadata-eval98.5%
/-rgt-identity98.5%
Simplified98.5%
Taylor expanded in y around 0 65.5%
if -7.6000000000000004e-76 < x < 2.9e-98Initial program 97.7%
+-commutative97.7%
*-commutative97.7%
associate-*l/77.4%
sub-neg77.4%
+-commutative77.4%
neg-sub077.4%
associate-+l-77.4%
sub0-neg77.4%
neg-mul-177.4%
times-frac91.9%
fma-def91.9%
sub-neg91.9%
+-commutative91.9%
neg-sub091.9%
associate-+l-91.9%
sub0-neg91.9%
neg-mul-191.9%
*-commutative91.9%
associate-/l*91.9%
metadata-eval91.9%
/-rgt-identity91.9%
Simplified91.9%
Taylor expanded in y around -inf 65.4%
*-commutative65.4%
associate-*r/80.0%
Simplified80.0%
Taylor expanded in z around 0 34.0%
associate-*l/43.5%
*-commutative43.5%
Simplified43.5%
Taylor expanded in t around inf 44.2%
Final simplification58.4%
(FPCore (x y z t a) :precision binary64 (+ x y))
double code(double x, double y, double z, double t, double a) {
return x + y;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x + y;
}
def code(x, y, z, t, a): return x + y
function code(x, y, z, t, a) return Float64(x + y) end
function tmp = code(x, y, z, t, a) tmp = x + y; end
code[x_, y_, z_, t_, a_] := N[(x + y), $MachinePrecision]
\begin{array}{l}
\\
x + y
\end{array}
Initial program 97.3%
+-commutative97.3%
*-commutative97.3%
associate-*l/85.5%
sub-neg85.5%
+-commutative85.5%
neg-sub085.5%
associate-+l-85.5%
sub0-neg85.5%
neg-mul-185.5%
times-frac96.3%
fma-def96.3%
sub-neg96.3%
+-commutative96.3%
neg-sub096.3%
associate-+l-96.3%
sub0-neg96.3%
neg-mul-196.3%
*-commutative96.3%
associate-/l*96.3%
metadata-eval96.3%
/-rgt-identity96.3%
Simplified96.3%
Taylor expanded in t around inf 63.0%
Final simplification63.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 97.3%
+-commutative97.3%
*-commutative97.3%
associate-*l/85.5%
sub-neg85.5%
+-commutative85.5%
neg-sub085.5%
associate-+l-85.5%
sub0-neg85.5%
neg-mul-185.5%
times-frac96.3%
fma-def96.3%
sub-neg96.3%
+-commutative96.3%
neg-sub096.3%
associate-+l-96.3%
sub0-neg96.3%
neg-mul-196.3%
*-commutative96.3%
associate-/l*96.3%
metadata-eval96.3%
/-rgt-identity96.3%
Simplified96.3%
Taylor expanded in y around 0 48.5%
Final simplification48.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (< y -8.508084860551241e-17)
t_1
(if (< y 2.894426862792089e-49)
(+ x (* (* y (- z t)) (/ 1.0 (- a t))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = x + (y * ((z - t) / (a - t)))
if (y < (-8.508084860551241d-17)) then
tmp = t_1
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) * (1.0d0 / (a - t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) tmp = 0 if y < -8.508084860551241e-17: tmp = t_1 elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) * (1.0 / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) * Float64(1.0 / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); tmp = 0.0; if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) * (1.0 / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -8.508084860551241e-17], t$95$1, If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023224
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))