
(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 15 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 82.3%
associate-/l*98.6%
Simplified98.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.7e+156)
(+ x y)
(if (<= t -1.85e-33)
(- x (/ z (/ t y)))
(if (<= t 1.55e-26) (+ x (* z (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.7e+156) {
tmp = x + y;
} else if (t <= -1.85e-33) {
tmp = x - (z / (t / y));
} else if (t <= 1.55e-26) {
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 <= (-2.7d+156)) then
tmp = x + y
else if (t <= (-1.85d-33)) then
tmp = x - (z / (t / y))
else if (t <= 1.55d-26) 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 <= -2.7e+156) {
tmp = x + y;
} else if (t <= -1.85e-33) {
tmp = x - (z / (t / y));
} else if (t <= 1.55e-26) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.7e+156: tmp = x + y elif t <= -1.85e-33: tmp = x - (z / (t / y)) elif t <= 1.55e-26: tmp = x + (z * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.7e+156) tmp = Float64(x + y); elseif (t <= -1.85e-33) tmp = Float64(x - Float64(z / Float64(t / y))); elseif (t <= 1.55e-26) 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 <= -2.7e+156) tmp = x + y; elseif (t <= -1.85e-33) tmp = x - (z / (t / y)); elseif (t <= 1.55e-26) tmp = x + (z * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.7e+156], N[(x + y), $MachinePrecision], If[LessEqual[t, -1.85e-33], N[(x - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e-26], 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.7 \cdot 10^{+156}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -1.85 \cdot 10^{-33}:\\
\;\;\;\;x - \frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-26}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -2.7e156 or 1.54999999999999992e-26 < t Initial program 71.0%
+-commutative71.0%
*-commutative71.0%
associate-/l*93.8%
fma-define93.8%
Simplified93.8%
Taylor expanded in t around inf 78.4%
+-commutative78.4%
Simplified78.4%
if -2.7e156 < t < -1.85000000000000007e-33Initial program 82.9%
+-commutative82.9%
*-commutative82.9%
associate-/l*95.6%
fma-define95.6%
Simplified95.6%
fma-undefine95.6%
clear-num95.5%
un-div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in a around 0 80.2%
neg-mul-180.2%
distribute-neg-frac80.2%
Simplified80.2%
Taylor expanded in z around inf 72.4%
if -1.85000000000000007e-33 < t < 1.54999999999999992e-26Initial program 95.8%
+-commutative95.8%
*-commutative95.8%
associate-/l*94.9%
fma-define94.9%
Simplified94.9%
Taylor expanded in t around 0 77.2%
+-commutative77.2%
associate-/l*77.0%
Simplified77.0%
clear-num76.9%
un-div-inv78.0%
Applied egg-rr78.0%
associate-/r/78.2%
Simplified78.2%
Final simplification77.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.65e+68)
(+ x y)
(if (<= t -1.45e-33)
(- x (/ (* y z) t))
(if (<= t 2.35e-26) (+ x (* z (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.65e+68) {
tmp = x + y;
} else if (t <= -1.45e-33) {
tmp = x - ((y * z) / t);
} else if (t <= 2.35e-26) {
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.65d+68)) then
tmp = x + y
else if (t <= (-1.45d-33)) then
tmp = x - ((y * z) / t)
else if (t <= 2.35d-26) 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.65e+68) {
tmp = x + y;
} else if (t <= -1.45e-33) {
tmp = x - ((y * z) / t);
} else if (t <= 2.35e-26) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.65e+68: tmp = x + y elif t <= -1.45e-33: tmp = x - ((y * z) / t) elif t <= 2.35e-26: tmp = x + (z * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.65e+68) tmp = Float64(x + y); elseif (t <= -1.45e-33) tmp = Float64(x - Float64(Float64(y * z) / t)); elseif (t <= 2.35e-26) 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.65e+68) tmp = x + y; elseif (t <= -1.45e-33) tmp = x - ((y * z) / t); elseif (t <= 2.35e-26) tmp = x + (z * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.65e+68], N[(x + y), $MachinePrecision], If[LessEqual[t, -1.45e-33], N[(x - N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.35e-26], 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.65 \cdot 10^{+68}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-33}:\\
\;\;\;\;x - \frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{-26}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.65e68 or 2.34999999999999995e-26 < t Initial program 70.8%
+-commutative70.8%
*-commutative70.8%
associate-/l*94.1%
fma-define94.1%
Simplified94.1%
Taylor expanded in t around inf 77.1%
+-commutative77.1%
Simplified77.1%
if -1.65e68 < t < -1.45000000000000001e-33Initial program 95.7%
+-commutative95.7%
*-commutative95.7%
associate-/l*95.5%
fma-define95.6%
Simplified95.6%
Taylor expanded in a around 0 77.7%
mul-1-neg77.7%
unsub-neg77.7%
associate-/l*77.5%
div-sub77.4%
sub-neg77.4%
*-inverses77.4%
metadata-eval77.4%
Simplified77.4%
Taylor expanded in z around inf 70.3%
if -1.45000000000000001e-33 < t < 2.34999999999999995e-26Initial program 95.8%
+-commutative95.8%
*-commutative95.8%
associate-/l*94.9%
fma-define94.9%
Simplified94.9%
Taylor expanded in t around 0 77.2%
+-commutative77.2%
associate-/l*77.0%
Simplified77.0%
clear-num76.9%
un-div-inv78.0%
Applied egg-rr78.0%
associate-/r/78.2%
Simplified78.2%
Final simplification76.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.9e+34)
(+ x y)
(if (<= t -5.6e-34)
(* y (/ z (- a t)))
(if (<= t 2e-26) (+ x (* z (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.9e+34) {
tmp = x + y;
} else if (t <= -5.6e-34) {
tmp = y * (z / (a - t));
} else if (t <= 2e-26) {
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 <= (-3.9d+34)) then
tmp = x + y
else if (t <= (-5.6d-34)) then
tmp = y * (z / (a - t))
else if (t <= 2d-26) 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 <= -3.9e+34) {
tmp = x + y;
} else if (t <= -5.6e-34) {
tmp = y * (z / (a - t));
} else if (t <= 2e-26) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.9e+34: tmp = x + y elif t <= -5.6e-34: tmp = y * (z / (a - t)) elif t <= 2e-26: tmp = x + (z * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.9e+34) tmp = Float64(x + y); elseif (t <= -5.6e-34) tmp = Float64(y * Float64(z / Float64(a - t))); elseif (t <= 2e-26) 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 <= -3.9e+34) tmp = x + y; elseif (t <= -5.6e-34) tmp = y * (z / (a - t)); elseif (t <= 2e-26) tmp = x + (z * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.9e+34], N[(x + y), $MachinePrecision], If[LessEqual[t, -5.6e-34], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-26], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.9 \cdot 10^{+34}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -5.6 \cdot 10^{-34}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-26}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -3.90000000000000019e34 or 2.0000000000000001e-26 < t Initial program 72.4%
+-commutative72.4%
*-commutative72.4%
associate-/l*93.7%
fma-define93.7%
Simplified93.7%
Taylor expanded in t around inf 76.4%
+-commutative76.4%
Simplified76.4%
if -3.90000000000000019e34 < t < -5.59999999999999994e-34Initial program 93.8%
+-commutative93.8%
*-commutative93.8%
associate-/l*99.9%
fma-define100.0%
Simplified100.0%
fma-undefine99.9%
clear-num99.8%
un-div-inv99.7%
Applied egg-rr99.7%
div-sub99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 65.2%
div-sub65.2%
associate-/r/64.9%
Simplified64.9%
if -5.59999999999999994e-34 < t < 2.0000000000000001e-26Initial program 95.8%
+-commutative95.8%
*-commutative95.8%
associate-/l*94.8%
fma-define94.9%
Simplified94.9%
Taylor expanded in t around 0 78.0%
+-commutative78.0%
associate-/l*77.8%
Simplified77.8%
clear-num77.7%
un-div-inv78.8%
Applied egg-rr78.8%
associate-/r/79.0%
Simplified79.0%
Final simplification76.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -4e+34)
(+ x y)
(if (<= t -5.6e-34)
(* y (/ z (- a t)))
(if (<= t 2.3e-49) (+ x (/ (* y z) a)) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4e+34) {
tmp = x + y;
} else if (t <= -5.6e-34) {
tmp = y * (z / (a - t));
} else if (t <= 2.3e-49) {
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 <= (-4d+34)) then
tmp = x + y
else if (t <= (-5.6d-34)) then
tmp = y * (z / (a - t))
else if (t <= 2.3d-49) 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 <= -4e+34) {
tmp = x + y;
} else if (t <= -5.6e-34) {
tmp = y * (z / (a - t));
} else if (t <= 2.3e-49) {
tmp = x + ((y * z) / a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4e+34: tmp = x + y elif t <= -5.6e-34: tmp = y * (z / (a - t)) elif t <= 2.3e-49: tmp = x + ((y * z) / a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4e+34) tmp = Float64(x + y); elseif (t <= -5.6e-34) tmp = Float64(y * Float64(z / Float64(a - t))); elseif (t <= 2.3e-49) tmp = Float64(x + Float64(Float64(y * 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 <= -4e+34) tmp = x + y; elseif (t <= -5.6e-34) tmp = y * (z / (a - t)); elseif (t <= 2.3e-49) tmp = x + ((y * z) / a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4e+34], N[(x + y), $MachinePrecision], If[LessEqual[t, -5.6e-34], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-49], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+34}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -5.6 \cdot 10^{-34}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -3.99999999999999978e34 or 2.2999999999999999e-49 < t Initial program 72.5%
+-commutative72.5%
*-commutative72.5%
associate-/l*93.9%
fma-define93.9%
Simplified93.9%
Taylor expanded in t around inf 76.1%
+-commutative76.1%
Simplified76.1%
if -3.99999999999999978e34 < t < -5.59999999999999994e-34Initial program 93.8%
+-commutative93.8%
*-commutative93.8%
associate-/l*99.9%
fma-define100.0%
Simplified100.0%
fma-undefine99.9%
clear-num99.8%
un-div-inv99.7%
Applied egg-rr99.7%
div-sub99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 65.2%
div-sub65.2%
associate-/r/64.9%
Simplified64.9%
if -5.59999999999999994e-34 < t < 2.2999999999999999e-49Initial program 96.7%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in t around 0 79.2%
Final simplification76.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.35e-9) (not (<= z 7.5e-21))) (+ x (/ z (/ (- a t) y))) (+ x (* t (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.35e-9) || !(z <= 7.5e-21)) {
tmp = x + (z / ((a - t) / y));
} 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 ((z <= (-3.35d-9)) .or. (.not. (z <= 7.5d-21))) then
tmp = x + (z / ((a - t) / y))
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 ((z <= -3.35e-9) || !(z <= 7.5e-21)) {
tmp = x + (z / ((a - t) / y));
} else {
tmp = x + (t * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.35e-9) or not (z <= 7.5e-21): tmp = x + (z / ((a - t) / y)) else: tmp = x + (t * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.35e-9) || !(z <= 7.5e-21)) tmp = Float64(x + Float64(z / Float64(Float64(a - t) / y))); 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 ((z <= -3.35e-9) || ~((z <= 7.5e-21))) tmp = x + (z / ((a - t) / y)); else tmp = x + (t * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.35e-9], N[Not[LessEqual[z, 7.5e-21]], $MachinePrecision]], N[(x + N[(z / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.35 \cdot 10^{-9} \lor \neg \left(z \leq 7.5 \cdot 10^{-21}\right):\\
\;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if z < -3.34999999999999981e-9 or 7.50000000000000072e-21 < z Initial program 78.4%
+-commutative78.4%
*-commutative78.4%
associate-/l*94.4%
fma-define94.4%
Simplified94.4%
fma-undefine94.4%
clear-num94.1%
un-div-inv94.2%
Applied egg-rr94.2%
Taylor expanded in z around inf 81.3%
if -3.34999999999999981e-9 < z < 7.50000000000000072e-21Initial program 86.3%
*-commutative86.3%
associate-*r/94.6%
*-commutative94.6%
Applied egg-rr94.6%
Taylor expanded in z around 0 79.2%
associate-*r/89.8%
neg-mul-189.8%
unsub-neg89.8%
Simplified89.8%
Final simplification85.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.7e+156) (not (<= t 1.15e-13))) (+ x y) (+ x (/ z (/ (- a t) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.7e+156) || !(t <= 1.15e-13)) {
tmp = x + y;
} else {
tmp = x + (z / ((a - t) / 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 <= (-2.7d+156)) .or. (.not. (t <= 1.15d-13))) then
tmp = x + y
else
tmp = x + (z / ((a - t) / 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 <= -2.7e+156) || !(t <= 1.15e-13)) {
tmp = x + y;
} else {
tmp = x + (z / ((a - t) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.7e+156) or not (t <= 1.15e-13): tmp = x + y else: tmp = x + (z / ((a - t) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.7e+156) || !(t <= 1.15e-13)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z / Float64(Float64(a - t) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.7e+156) || ~((t <= 1.15e-13))) tmp = x + y; else tmp = x + (z / ((a - t) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.7e+156], N[Not[LessEqual[t, 1.15e-13]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{+156} \lor \neg \left(t \leq 1.15 \cdot 10^{-13}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\
\end{array}
\end{array}
if t < -2.7e156 or 1.1499999999999999e-13 < t Initial program 69.9%
+-commutative69.9%
*-commutative69.9%
associate-/l*94.3%
fma-define94.3%
Simplified94.3%
Taylor expanded in t around inf 79.4%
+-commutative79.4%
Simplified79.4%
if -2.7e156 < t < 1.1499999999999999e-13Initial program 92.0%
+-commutative92.0%
*-commutative92.0%
associate-/l*94.6%
fma-define94.7%
Simplified94.7%
fma-undefine94.6%
clear-num94.6%
un-div-inv94.7%
Applied egg-rr94.7%
Taylor expanded in z around inf 83.4%
Final simplification81.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -7.2e+67) (not (<= t 1.3e-44))) (+ x y) (+ x (/ (* y z) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -7.2e+67) || !(t <= 1.3e-44)) {
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 <= (-7.2d+67)) .or. (.not. (t <= 1.3d-44))) 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 <= -7.2e+67) || !(t <= 1.3e-44)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -7.2e+67) or not (t <= 1.3e-44): tmp = x + y else: tmp = x + ((y * z) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -7.2e+67) || !(t <= 1.3e-44)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -7.2e+67) || ~((t <= 1.3e-44))) 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, -7.2e+67], N[Not[LessEqual[t, 1.3e-44]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+67} \lor \neg \left(t \leq 1.3 \cdot 10^{-44}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{a - t}\\
\end{array}
\end{array}
if t < -7.1999999999999998e67 or 1.2999999999999999e-44 < t Initial program 71.0%
+-commutative71.0%
*-commutative71.0%
associate-/l*94.2%
fma-define94.2%
Simplified94.2%
Taylor expanded in t around inf 76.7%
+-commutative76.7%
Simplified76.7%
if -7.1999999999999998e67 < t < 1.2999999999999999e-44Initial program 96.5%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in z around inf 86.6%
Final simplification81.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.2e-90) (+ x (* y (/ (- t z) t))) (if (<= t 1.85e-83) (+ 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 (t <= -3.2e-90) {
tmp = x + (y * ((t - z) / t));
} else if (t <= 1.85e-83) {
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 (t <= (-3.2d-90)) then
tmp = x + (y * ((t - z) / t))
else if (t <= 1.85d-83) 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 (t <= -3.2e-90) {
tmp = x + (y * ((t - z) / t));
} else if (t <= 1.85e-83) {
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 t <= -3.2e-90: tmp = x + (y * ((t - z) / t)) elif t <= 1.85e-83: 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 (t <= -3.2e-90) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / t))); elseif (t <= 1.85e-83) tmp = Float64(x + Float64(Float64(y * z) / Float64(a - t))); else tmp = Float64(x - Float64(y * Float64(t / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.2e-90) tmp = x + (y * ((t - z) / t)); elseif (t <= 1.85e-83) 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[LessEqual[t, -3.2e-90], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e-83], N[(x + N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-90}:\\
\;\;\;\;x + y \cdot \frac{t - z}{t}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-83}:\\
\;\;\;\;x + \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t}{a - t}\\
\end{array}
\end{array}
if t < -3.20000000000000007e-90Initial program 79.9%
+-commutative79.9%
*-commutative79.9%
associate-/l*93.5%
fma-define93.5%
Simplified93.5%
Taylor expanded in a around 0 70.0%
mul-1-neg70.0%
unsub-neg70.0%
associate-/l*81.4%
div-sub81.3%
sub-neg81.3%
*-inverses81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in t around 0 69.8%
+-commutative69.8%
mul-1-neg69.8%
*-commutative69.8%
distribute-rgt-neg-in69.8%
distribute-lft-in70.0%
sub-neg70.0%
associate-/l*81.4%
Simplified81.4%
if -3.20000000000000007e-90 < t < 1.84999999999999997e-83Initial program 97.2%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in z around inf 95.9%
if 1.84999999999999997e-83 < t Initial program 72.4%
+-commutative72.4%
*-commutative72.4%
associate-/l*96.6%
fma-define96.6%
Simplified96.6%
Taylor expanded in z around 0 65.1%
mul-1-neg65.1%
unsub-neg65.1%
*-commutative65.1%
*-lft-identity65.1%
times-frac90.3%
/-rgt-identity90.3%
Simplified90.3%
Final simplification88.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.2e-90) (- x (* y (+ (/ z t) -1.0))) (if (<= t 1.15e-84) (+ x (/ (* y z) (- a t))) (+ x (* y (/ t (- t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.2e-90) {
tmp = x - (y * ((z / t) + -1.0));
} else if (t <= 1.15e-84) {
tmp = x + ((y * z) / (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 <= (-3.2d-90)) then
tmp = x - (y * ((z / t) + (-1.0d0)))
else if (t <= 1.15d-84) then
tmp = x + ((y * z) / (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 <= -3.2e-90) {
tmp = x - (y * ((z / t) + -1.0));
} else if (t <= 1.15e-84) {
tmp = x + ((y * z) / (a - t));
} else {
tmp = x + (y * (t / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.2e-90: tmp = x - (y * ((z / t) + -1.0)) elif t <= 1.15e-84: tmp = x + ((y * z) / (a - t)) else: tmp = x + (y * (t / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.2e-90) tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))); elseif (t <= 1.15e-84) tmp = Float64(x + Float64(Float64(y * z) / 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 <= -3.2e-90) tmp = x - (y * ((z / t) + -1.0)); elseif (t <= 1.15e-84) tmp = x + ((y * z) / (a - t)); else tmp = x + (y * (t / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.2e-90], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e-84], N[(x + N[(N[(y * z), $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 -3.2 \cdot 10^{-90}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-84}:\\
\;\;\;\;x + \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\end{array}
\end{array}
if t < -3.20000000000000007e-90Initial program 79.9%
+-commutative79.9%
*-commutative79.9%
associate-/l*93.5%
fma-define93.5%
Simplified93.5%
Taylor expanded in a around 0 70.0%
mul-1-neg70.0%
unsub-neg70.0%
associate-/l*81.4%
div-sub81.3%
sub-neg81.3%
*-inverses81.3%
metadata-eval81.3%
Simplified81.3%
if -3.20000000000000007e-90 < t < 1.1499999999999999e-84Initial program 97.2%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in z around inf 95.9%
if 1.1499999999999999e-84 < t Initial program 72.4%
+-commutative72.4%
*-commutative72.4%
associate-/l*96.6%
fma-define96.6%
Simplified96.6%
Taylor expanded in z around 0 65.1%
mul-1-neg65.1%
unsub-neg65.1%
*-commutative65.1%
*-lft-identity65.1%
times-frac90.3%
/-rgt-identity90.3%
Simplified90.3%
Final simplification88.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.2e-90) (- x (* y (+ (/ z t) -1.0))) (if (<= t 2.3e-84) (+ x (/ (* y z) (- a t))) (+ x (* t (/ y (- t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.2e-90) {
tmp = x - (y * ((z / t) + -1.0));
} else if (t <= 2.3e-84) {
tmp = x + ((y * z) / (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 <= (-3.2d-90)) then
tmp = x - (y * ((z / t) + (-1.0d0)))
else if (t <= 2.3d-84) then
tmp = x + ((y * z) / (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 <= -3.2e-90) {
tmp = x - (y * ((z / t) + -1.0));
} else if (t <= 2.3e-84) {
tmp = x + ((y * z) / (a - t));
} else {
tmp = x + (t * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.2e-90: tmp = x - (y * ((z / t) + -1.0)) elif t <= 2.3e-84: tmp = x + ((y * z) / (a - t)) else: tmp = x + (t * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.2e-90) tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))); elseif (t <= 2.3e-84) tmp = Float64(x + Float64(Float64(y * z) / 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 <= -3.2e-90) tmp = x - (y * ((z / t) + -1.0)); elseif (t <= 2.3e-84) tmp = x + ((y * z) / (a - t)); else tmp = x + (t * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.2e-90], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-84], N[(x + N[(N[(y * z), $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 -3.2 \cdot 10^{-90}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-84}:\\
\;\;\;\;x + \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if t < -3.20000000000000007e-90Initial program 79.9%
+-commutative79.9%
*-commutative79.9%
associate-/l*93.5%
fma-define93.5%
Simplified93.5%
Taylor expanded in a around 0 70.0%
mul-1-neg70.0%
unsub-neg70.0%
associate-/l*81.4%
div-sub81.3%
sub-neg81.3%
*-inverses81.3%
metadata-eval81.3%
Simplified81.3%
if -3.20000000000000007e-90 < t < 2.29999999999999981e-84Initial program 97.2%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in z around inf 95.9%
if 2.29999999999999981e-84 < t Initial program 72.4%
*-commutative72.4%
associate-*r/96.6%
*-commutative96.6%
Applied egg-rr96.6%
Taylor expanded in z around 0 65.1%
associate-*r/87.1%
neg-mul-187.1%
unsub-neg87.1%
Simplified87.1%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.5e+58) (not (<= t 2.1e-46))) (+ x y) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.5e+58) || !(t <= 2.1e-46)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-3.5d+58)) .or. (.not. (t <= 2.1d-46))) then
tmp = x + y
else
tmp = x + (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.5e+58) || !(t <= 2.1e-46)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.5e+58) or not (t <= 2.1e-46): tmp = x + y else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.5e+58) || !(t <= 2.1e-46)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.5e+58) || ~((t <= 2.1e-46))) tmp = x + y; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.5e+58], N[Not[LessEqual[t, 2.1e-46]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{+58} \lor \neg \left(t \leq 2.1 \cdot 10^{-46}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -3.4999999999999997e58 or 2.09999999999999987e-46 < t Initial program 71.8%
+-commutative71.8%
*-commutative71.8%
associate-/l*94.4%
fma-define94.4%
Simplified94.4%
Taylor expanded in t around inf 76.1%
+-commutative76.1%
Simplified76.1%
if -3.4999999999999997e58 < t < 2.09999999999999987e-46Initial program 96.4%
+-commutative96.4%
*-commutative96.4%
associate-/l*94.7%
fma-define94.7%
Simplified94.7%
Taylor expanded in t around 0 73.2%
+-commutative73.2%
associate-/l*73.8%
Simplified73.8%
Final simplification75.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.25e-219) (not (<= t 2.7e-85))) (+ x y) (* y (/ z (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.25e-219) || !(t <= 2.7e-85)) {
tmp = x + y;
} else {
tmp = 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.25d-219)) .or. (.not. (t <= 2.7d-85))) then
tmp = x + y
else
tmp = 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.25e-219) || !(t <= 2.7e-85)) {
tmp = x + y;
} else {
tmp = y * (z / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.25e-219) or not (t <= 2.7e-85): tmp = x + y else: tmp = y * (z / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.25e-219) || !(t <= 2.7e-85)) tmp = Float64(x + y); else tmp = 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.25e-219) || ~((t <= 2.7e-85))) tmp = x + y; else tmp = y * (z / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.25e-219], N[Not[LessEqual[t, 2.7e-85]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{-219} \lor \neg \left(t \leq 2.7 \cdot 10^{-85}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -1.25e-219 or 2.7000000000000001e-85 < t Initial program 79.1%
+-commutative79.1%
*-commutative79.1%
associate-/l*94.6%
fma-define94.7%
Simplified94.7%
Taylor expanded in t around inf 69.2%
+-commutative69.2%
Simplified69.2%
if -1.25e-219 < t < 2.7000000000000001e-85Initial program 95.9%
+-commutative95.9%
*-commutative95.9%
associate-/l*93.9%
fma-define93.9%
Simplified93.9%
fma-undefine93.9%
clear-num93.9%
un-div-inv93.9%
Applied egg-rr93.9%
div-sub94.0%
Applied egg-rr94.0%
Taylor expanded in z around inf 54.5%
div-sub54.4%
associate-/r/60.1%
Simplified60.1%
Final simplification67.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.8e+232) x (if (<= a 3.6e+117) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e+232) {
tmp = x;
} else if (a <= 3.6e+117) {
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 (a <= (-3.8d+232)) then
tmp = x
else if (a <= 3.6d+117) 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 (a <= -3.8e+232) {
tmp = x;
} else if (a <= 3.6e+117) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.8e+232: tmp = x elif a <= 3.6e+117: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.8e+232) tmp = x; elseif (a <= 3.6e+117) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.8e+232) tmp = x; elseif (a <= 3.6e+117) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.8e+232], x, If[LessEqual[a, 3.6e+117], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{+232}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{+117}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.8000000000000001e232 or 3.60000000000000013e117 < a Initial program 75.8%
+-commutative75.8%
*-commutative75.8%
associate-/l*96.8%
fma-define96.8%
Simplified96.8%
Taylor expanded in y around 0 70.0%
if -3.8000000000000001e232 < a < 3.60000000000000013e117Initial program 84.2%
+-commutative84.2%
*-commutative84.2%
associate-/l*93.8%
fma-define93.8%
Simplified93.8%
Taylor expanded in t around inf 64.0%
+-commutative64.0%
Simplified64.0%
Final simplification65.4%
(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 82.3%
+-commutative82.3%
*-commutative82.3%
associate-/l*94.5%
fma-define94.5%
Simplified94.5%
Taylor expanded in y around 0 48.2%
(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 2024172
(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))))