
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- 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}
Initial program 88.2%
associate-/l*98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- a t)))))
(if (<= z -9.4e+132)
t_1
(if (<= z -1.55e+24)
x
(if (or (<= z -8.2e-10) (and (not (<= z 3.5e+85)) (<= z 4e+176)))
t_1
(+ x y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (a - t));
double tmp;
if (z <= -9.4e+132) {
tmp = t_1;
} else if (z <= -1.55e+24) {
tmp = x;
} else if ((z <= -8.2e-10) || (!(z <= 3.5e+85) && (z <= 4e+176))) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = y * (z / (a - t))
if (z <= (-9.4d+132)) then
tmp = t_1
else if (z <= (-1.55d+24)) then
tmp = x
else if ((z <= (-8.2d-10)) .or. (.not. (z <= 3.5d+85)) .and. (z <= 4d+176)) then
tmp = t_1
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 t_1 = y * (z / (a - t));
double tmp;
if (z <= -9.4e+132) {
tmp = t_1;
} else if (z <= -1.55e+24) {
tmp = x;
} else if ((z <= -8.2e-10) || (!(z <= 3.5e+85) && (z <= 4e+176))) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / (a - t)) tmp = 0 if z <= -9.4e+132: tmp = t_1 elif z <= -1.55e+24: tmp = x elif (z <= -8.2e-10) or (not (z <= 3.5e+85) and (z <= 4e+176)): tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(a - t))) tmp = 0.0 if (z <= -9.4e+132) tmp = t_1; elseif (z <= -1.55e+24) tmp = x; elseif ((z <= -8.2e-10) || (!(z <= 3.5e+85) && (z <= 4e+176))) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / (a - t)); tmp = 0.0; if (z <= -9.4e+132) tmp = t_1; elseif (z <= -1.55e+24) tmp = x; elseif ((z <= -8.2e-10) || (~((z <= 3.5e+85)) && (z <= 4e+176))) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.4e+132], t$95$1, If[LessEqual[z, -1.55e+24], x, If[Or[LessEqual[z, -8.2e-10], And[N[Not[LessEqual[z, 3.5e+85]], $MachinePrecision], LessEqual[z, 4e+176]]], t$95$1, N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a - t}\\
\mathbf{if}\;z \leq -9.4 \cdot 10^{+132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-10} \lor \neg \left(z \leq 3.5 \cdot 10^{+85}\right) \land z \leq 4 \cdot 10^{+176}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -9.400000000000001e132 or -1.55000000000000005e24 < z < -8.1999999999999996e-10 or 3.50000000000000005e85 < z < 4e176Initial program 78.3%
associate-*l/93.3%
Simplified93.3%
Taylor expanded in x around 0 59.3%
associate-*l/79.2%
Applied egg-rr79.2%
Taylor expanded in z around inf 72.2%
if -9.400000000000001e132 < z < -1.55000000000000005e24Initial program 96.4%
associate-*l/92.3%
Simplified92.3%
Taylor expanded in x around inf 66.0%
if -8.1999999999999996e-10 < z < 3.50000000000000005e85 or 4e176 < z Initial program 90.4%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in t around inf 68.9%
Final simplification69.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= y -2.05e+161)
t_1
(if (<= y -5.5e-132)
(+ x (/ y (/ a z)))
(if (<= y -5.8e-202)
x
(if (<= y 61000000000000.0) (+ x (/ (* y z) a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (y <= -2.05e+161) {
tmp = t_1;
} else if (y <= -5.5e-132) {
tmp = x + (y / (a / z));
} else if (y <= -5.8e-202) {
tmp = x;
} else if (y <= 61000000000000.0) {
tmp = x + ((y * z) / a);
} 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 = y * ((z - t) / (a - t))
if (y <= (-2.05d+161)) then
tmp = t_1
else if (y <= (-5.5d-132)) then
tmp = x + (y / (a / z))
else if (y <= (-5.8d-202)) then
tmp = x
else if (y <= 61000000000000.0d0) then
tmp = x + ((y * z) / a)
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 = y * ((z - t) / (a - t));
double tmp;
if (y <= -2.05e+161) {
tmp = t_1;
} else if (y <= -5.5e-132) {
tmp = x + (y / (a / z));
} else if (y <= -5.8e-202) {
tmp = x;
} else if (y <= 61000000000000.0) {
tmp = x + ((y * z) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) tmp = 0 if y <= -2.05e+161: tmp = t_1 elif y <= -5.5e-132: tmp = x + (y / (a / z)) elif y <= -5.8e-202: tmp = x elif y <= 61000000000000.0: tmp = x + ((y * z) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (y <= -2.05e+161) tmp = t_1; elseif (y <= -5.5e-132) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (y <= -5.8e-202) tmp = x; elseif (y <= 61000000000000.0) tmp = Float64(x + Float64(Float64(y * z) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); tmp = 0.0; if (y <= -2.05e+161) tmp = t_1; elseif (y <= -5.5e-132) tmp = x + (y / (a / z)); elseif (y <= -5.8e-202) tmp = x; elseif (y <= 61000000000000.0) tmp = x + ((y * z) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.05e+161], t$95$1, If[LessEqual[y, -5.5e-132], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.8e-202], x, If[LessEqual[y, 61000000000000.0], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+161}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-132}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{-202}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 61000000000000:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.0500000000000001e161 or 6.1e13 < y Initial program 73.4%
associate-*l/95.6%
Simplified95.6%
Taylor expanded in x around 0 57.7%
associate-*l/83.3%
Applied egg-rr83.3%
if -2.0500000000000001e161 < y < -5.4999999999999999e-132Initial program 86.3%
associate-*l/98.0%
Simplified98.0%
Taylor expanded in t around 0 66.8%
associate-/l*76.5%
Simplified76.5%
if -5.4999999999999999e-132 < y < -5.79999999999999976e-202Initial program 99.9%
associate-*l/95.5%
Simplified95.5%
Taylor expanded in x around inf 86.4%
if -5.79999999999999976e-202 < y < 6.1e13Initial program 99.9%
associate-*l/91.1%
Simplified91.1%
Taylor expanded in t around 0 77.4%
Final simplification80.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.1e+76)
(+ x y)
(if (<= t -335000.0)
(* y (/ z (- a t)))
(if (<= t -7.1e-43)
(+ x y)
(if (<= t 6.8e-35) (+ x (* z (/ y a))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.1e+76) {
tmp = x + y;
} else if (t <= -335000.0) {
tmp = y * (z / (a - t));
} else if (t <= -7.1e-43) {
tmp = x + y;
} else if (t <= 6.8e-35) {
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 <= (-5.1d+76)) then
tmp = x + y
else if (t <= (-335000.0d0)) then
tmp = y * (z / (a - t))
else if (t <= (-7.1d-43)) then
tmp = x + y
else if (t <= 6.8d-35) 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 <= -5.1e+76) {
tmp = x + y;
} else if (t <= -335000.0) {
tmp = y * (z / (a - t));
} else if (t <= -7.1e-43) {
tmp = x + y;
} else if (t <= 6.8e-35) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.1e+76: tmp = x + y elif t <= -335000.0: tmp = y * (z / (a - t)) elif t <= -7.1e-43: tmp = x + y elif t <= 6.8e-35: tmp = x + (z * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.1e+76) tmp = Float64(x + y); elseif (t <= -335000.0) tmp = Float64(y * Float64(z / Float64(a - t))); elseif (t <= -7.1e-43) tmp = Float64(x + y); elseif (t <= 6.8e-35) 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 <= -5.1e+76) tmp = x + y; elseif (t <= -335000.0) tmp = y * (z / (a - t)); elseif (t <= -7.1e-43) tmp = x + y; elseif (t <= 6.8e-35) tmp = x + (z * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.1e+76], N[(x + y), $MachinePrecision], If[LessEqual[t, -335000.0], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.1e-43], N[(x + y), $MachinePrecision], If[LessEqual[t, 6.8e-35], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.1 \cdot 10^{+76}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -335000:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq -7.1 \cdot 10^{-43}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-35}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -5.1000000000000002e76 or -335000 < t < -7.10000000000000025e-43 or 6.8000000000000005e-35 < t Initial program 80.5%
associate-*l/94.1%
Simplified94.1%
Taylor expanded in t around inf 74.5%
if -5.1000000000000002e76 < t < -335000Initial program 84.9%
associate-*l/89.4%
Simplified89.4%
Taylor expanded in x around 0 59.1%
associate-*l/74.0%
Applied egg-rr74.0%
Taylor expanded in z around inf 59.0%
if -7.10000000000000025e-43 < t < 6.8000000000000005e-35Initial program 95.5%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in t around 0 82.8%
associate-/l*85.6%
associate-/r/84.3%
Applied egg-rr84.3%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.1e+76)
(+ x y)
(if (<= t -740.0)
(* y (/ z (- a t)))
(if (<= t -8.5e-43)
(+ x y)
(if (<= t 6.8e-35) (+ x (/ y (/ a z))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.1e+76) {
tmp = x + y;
} else if (t <= -740.0) {
tmp = y * (z / (a - t));
} else if (t <= -8.5e-43) {
tmp = x + y;
} else if (t <= 6.8e-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 <= (-5.1d+76)) then
tmp = x + y
else if (t <= (-740.0d0)) then
tmp = y * (z / (a - t))
else if (t <= (-8.5d-43)) then
tmp = x + y
else if (t <= 6.8d-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 <= -5.1e+76) {
tmp = x + y;
} else if (t <= -740.0) {
tmp = y * (z / (a - t));
} else if (t <= -8.5e-43) {
tmp = x + y;
} else if (t <= 6.8e-35) {
tmp = x + (y / (a / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.1e+76: tmp = x + y elif t <= -740.0: tmp = y * (z / (a - t)) elif t <= -8.5e-43: tmp = x + y elif t <= 6.8e-35: tmp = x + (y / (a / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.1e+76) tmp = Float64(x + y); elseif (t <= -740.0) tmp = Float64(y * Float64(z / Float64(a - t))); elseif (t <= -8.5e-43) tmp = Float64(x + y); elseif (t <= 6.8e-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 <= -5.1e+76) tmp = x + y; elseif (t <= -740.0) tmp = y * (z / (a - t)); elseif (t <= -8.5e-43) tmp = x + y; elseif (t <= 6.8e-35) tmp = x + (y / (a / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.1e+76], N[(x + y), $MachinePrecision], If[LessEqual[t, -740.0], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8.5e-43], N[(x + y), $MachinePrecision], If[LessEqual[t, 6.8e-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 -5.1 \cdot 10^{+76}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -740:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-43}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-35}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -5.1000000000000002e76 or -740 < t < -8.50000000000000056e-43 or 6.8000000000000005e-35 < t Initial program 80.5%
associate-*l/94.1%
Simplified94.1%
Taylor expanded in t around inf 74.5%
if -5.1000000000000002e76 < t < -740Initial program 84.9%
associate-*l/89.4%
Simplified89.4%
Taylor expanded in x around 0 59.1%
associate-*l/74.0%
Applied egg-rr74.0%
Taylor expanded in z around inf 59.0%
if -8.50000000000000056e-43 < t < 6.8000000000000005e-35Initial program 95.5%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in t around 0 82.8%
associate-/l*85.6%
Simplified85.6%
Final simplification78.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.1e+135)
(+ x y)
(if (<= t -8.8e-43)
(- x (/ (* y z) t))
(if (<= t 1.02e-34) (+ x (/ y (/ a z))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.1e+135) {
tmp = x + y;
} else if (t <= -8.8e-43) {
tmp = x - ((y * z) / t);
} else if (t <= 1.02e-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 <= (-2.1d+135)) then
tmp = x + y
else if (t <= (-8.8d-43)) then
tmp = x - ((y * z) / t)
else if (t <= 1.02d-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 <= -2.1e+135) {
tmp = x + y;
} else if (t <= -8.8e-43) {
tmp = x - ((y * z) / t);
} else if (t <= 1.02e-34) {
tmp = x + (y / (a / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.1e+135: tmp = x + y elif t <= -8.8e-43: tmp = x - ((y * z) / t) elif t <= 1.02e-34: tmp = x + (y / (a / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.1e+135) tmp = Float64(x + y); elseif (t <= -8.8e-43) tmp = Float64(x - Float64(Float64(y * z) / t)); elseif (t <= 1.02e-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 <= -2.1e+135) tmp = x + y; elseif (t <= -8.8e-43) tmp = x - ((y * z) / t); elseif (t <= 1.02e-34) tmp = x + (y / (a / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.1e+135], N[(x + y), $MachinePrecision], If[LessEqual[t, -8.8e-43], N[(x - N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e-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 -2.1 \cdot 10^{+135}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -8.8 \cdot 10^{-43}:\\
\;\;\;\;x - \frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-34}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -2.1000000000000001e135 or 1.01999999999999997e-34 < t Initial program 76.8%
associate-*l/92.4%
Simplified92.4%
Taylor expanded in t around inf 78.0%
if -2.1000000000000001e135 < t < -8.79999999999999989e-43Initial program 89.5%
+-commutative89.5%
associate-*r/99.9%
fma-def100.0%
Simplified100.0%
fma-udef99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 74.1%
+-commutative74.1%
mul-1-neg74.1%
unsub-neg74.1%
associate-/l*80.1%
Simplified80.1%
Taylor expanded in z around inf 61.7%
if -8.79999999999999989e-43 < t < 1.01999999999999997e-34Initial program 95.5%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in t around 0 82.8%
associate-/l*85.6%
Simplified85.6%
Final simplification79.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5e+54)
(+ x y)
(if (<= t -6.1e-43)
(- y (* z (/ y t)))
(if (<= t 9.4e-35) (+ x (/ y (/ a z))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5e+54) {
tmp = x + y;
} else if (t <= -6.1e-43) {
tmp = y - (z * (y / t));
} else if (t <= 9.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 <= (-5d+54)) then
tmp = x + y
else if (t <= (-6.1d-43)) then
tmp = y - (z * (y / t))
else if (t <= 9.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 <= -5e+54) {
tmp = x + y;
} else if (t <= -6.1e-43) {
tmp = y - (z * (y / t));
} else if (t <= 9.4e-35) {
tmp = x + (y / (a / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5e+54: tmp = x + y elif t <= -6.1e-43: tmp = y - (z * (y / t)) elif t <= 9.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 <= -5e+54) tmp = Float64(x + y); elseif (t <= -6.1e-43) tmp = Float64(y - Float64(z * Float64(y / t))); elseif (t <= 9.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 <= -5e+54) tmp = x + y; elseif (t <= -6.1e-43) tmp = y - (z * (y / t)); elseif (t <= 9.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, -5e+54], N[(x + y), $MachinePrecision], If[LessEqual[t, -6.1e-43], N[(y - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.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 -5 \cdot 10^{+54}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -6.1 \cdot 10^{-43}:\\
\;\;\;\;y - z \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq 9.4 \cdot 10^{-35}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -5.00000000000000005e54 or 9.4e-35 < t Initial program 78.6%
associate-*l/91.7%
Simplified91.7%
Taylor expanded in t around inf 76.1%
if -5.00000000000000005e54 < t < -6.10000000000000037e-43Initial program 90.1%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in x around 0 66.3%
associate-*l/76.0%
Applied egg-rr76.0%
Taylor expanded in a around 0 58.6%
mul-1-neg58.6%
associate-/l*64.9%
div-sub64.9%
associate-/l*58.6%
*-commutative58.6%
associate-/l*58.6%
*-commutative58.6%
associate-/l*58.7%
*-inverses58.7%
/-rgt-identity58.7%
unsub-neg58.7%
+-commutative58.7%
distribute-neg-out58.7%
remove-double-neg58.7%
unsub-neg58.7%
*-commutative58.7%
associate-*r/64.9%
Simplified64.9%
if -6.10000000000000037e-43 < t < 9.4e-35Initial program 95.5%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in t around 0 82.8%
associate-/l*85.6%
Simplified85.6%
Final simplification79.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.65e-111) (not (<= x 1.48e-111))) (+ x (* z (/ y (- a t)))) (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.65e-111) || !(x <= 1.48e-111)) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = y * ((z - 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 ((x <= (-2.65d-111)) .or. (.not. (x <= 1.48d-111))) then
tmp = x + (z * (y / (a - t)))
else
tmp = y * ((z - 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 ((x <= -2.65e-111) || !(x <= 1.48e-111)) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.65e-111) or not (x <= 1.48e-111): tmp = x + (z * (y / (a - t))) else: tmp = y * ((z - t) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.65e-111) || !(x <= 1.48e-111)) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.65e-111) || ~((x <= 1.48e-111))) tmp = x + (z * (y / (a - t))); else tmp = y * ((z - t) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.65e-111], N[Not[LessEqual[x, 1.48e-111]], $MachinePrecision]], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.65 \cdot 10^{-111} \lor \neg \left(x \leq 1.48 \cdot 10^{-111}\right):\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if x < -2.6499999999999999e-111 or 1.4799999999999999e-111 < x Initial program 89.4%
associate-*l/97.8%
Simplified97.8%
Taylor expanded in z around inf 83.7%
associate-*l/86.8%
*-commutative86.8%
Simplified86.8%
if -2.6499999999999999e-111 < x < 1.4799999999999999e-111Initial program 85.9%
associate-*l/87.6%
Simplified87.6%
Taylor expanded in x around 0 66.7%
associate-*l/80.6%
Applied egg-rr80.6%
Final simplification84.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.9e-43) (not (<= t 3.15e-30))) (- x (/ y (/ t (- z t)))) (+ x (/ y (/ a (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.9e-43) || !(t <= 3.15e-30)) {
tmp = x - (y / (t / (z - t)));
} else {
tmp = x + (y / (a / (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 <= (-5.9d-43)) .or. (.not. (t <= 3.15d-30))) then
tmp = x - (y / (t / (z - t)))
else
tmp = x + (y / (a / (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 <= -5.9e-43) || !(t <= 3.15e-30)) {
tmp = x - (y / (t / (z - t)));
} else {
tmp = x + (y / (a / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.9e-43) or not (t <= 3.15e-30): tmp = x - (y / (t / (z - t))) else: tmp = x + (y / (a / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.9e-43) || !(t <= 3.15e-30)) tmp = Float64(x - Float64(y / Float64(t / Float64(z - t)))); else tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.9e-43) || ~((t <= 3.15e-30))) tmp = x - (y / (t / (z - t))); else tmp = x + (y / (a / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.9e-43], N[Not[LessEqual[t, 3.15e-30]], $MachinePrecision]], N[(x - N[(y / N[(t / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.9 \cdot 10^{-43} \lor \neg \left(t \leq 3.15 \cdot 10^{-30}\right):\\
\;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\end{array}
\end{array}
if t < -5.89999999999999976e-43 or 3.14999999999999991e-30 < t Initial program 80.8%
associate-*l/93.3%
Simplified93.3%
Taylor expanded in a around 0 68.0%
+-commutative68.0%
mul-1-neg68.0%
unsub-neg68.0%
*-commutative68.0%
associate-/l*82.6%
Simplified82.6%
if -5.89999999999999976e-43 < t < 3.14999999999999991e-30Initial program 95.6%
associate-*l/95.4%
Simplified95.4%
Taylor expanded in a around inf 87.0%
associate-/l*89.9%
Simplified89.9%
Final simplification86.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (- a t))))
(if (or (<= z -8.5e-11) (not (<= z 1.8e-22)))
(+ x (* z t_1))
(- x (* t t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a - t);
double tmp;
if ((z <= -8.5e-11) || !(z <= 1.8e-22)) {
tmp = x + (z * t_1);
} else {
tmp = x - (t * 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 = y / (a - t)
if ((z <= (-8.5d-11)) .or. (.not. (z <= 1.8d-22))) then
tmp = x + (z * t_1)
else
tmp = x - (t * 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 = y / (a - t);
double tmp;
if ((z <= -8.5e-11) || !(z <= 1.8e-22)) {
tmp = x + (z * t_1);
} else {
tmp = x - (t * t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (a - t) tmp = 0 if (z <= -8.5e-11) or not (z <= 1.8e-22): tmp = x + (z * t_1) else: tmp = x - (t * t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(a - t)) tmp = 0.0 if ((z <= -8.5e-11) || !(z <= 1.8e-22)) tmp = Float64(x + Float64(z * t_1)); else tmp = Float64(x - Float64(t * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (a - t); tmp = 0.0; if ((z <= -8.5e-11) || ~((z <= 1.8e-22))) tmp = x + (z * t_1); else tmp = x - (t * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -8.5e-11], N[Not[LessEqual[z, 1.8e-22]], $MachinePrecision]], N[(x + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a - t}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{-11} \lor \neg \left(z \leq 1.8 \cdot 10^{-22}\right):\\
\;\;\;\;x + z \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot t_1\\
\end{array}
\end{array}
if z < -8.50000000000000037e-11 or 1.7999999999999999e-22 < z Initial program 83.9%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in z around inf 78.9%
associate-*l/85.3%
*-commutative85.3%
Simplified85.3%
if -8.50000000000000037e-11 < z < 1.7999999999999999e-22Initial program 93.4%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in z around 0 86.0%
associate-*r/86.0%
mul-1-neg86.0%
distribute-rgt-neg-out86.0%
associate-*l/90.2%
Simplified90.2%
Final simplification87.5%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((z - t) * (y / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - t)));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{a - t}
\end{array}
Initial program 88.2%
associate-*l/94.4%
Simplified94.4%
Final simplification94.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.2e+132) (* y (/ z a)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.2e+132) {
tmp = 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 (z <= (-6.2d+132)) then
tmp = 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 (z <= -6.2e+132) {
tmp = y * (z / a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.2e+132: tmp = y * (z / a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.2e+132) tmp = 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 (z <= -6.2e+132) tmp = y * (z / a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.2e+132], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+132}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -6.1999999999999995e132Initial program 82.5%
associate-*l/88.2%
Simplified88.2%
Taylor expanded in x around 0 65.4%
associate-*l/79.7%
Applied egg-rr79.7%
Taylor expanded in t around 0 58.4%
if -6.1999999999999995e132 < z Initial program 89.0%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in t around inf 63.7%
Final simplification63.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.8e+133) (/ y (/ a z)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.8e+133) {
tmp = 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 (z <= (-9.8d+133)) then
tmp = 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 (z <= -9.8e+133) {
tmp = y / (a / z);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.8e+133: tmp = y / (a / z) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.8e+133) tmp = 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 (z <= -9.8e+133) tmp = y / (a / z); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.8e+133], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+133}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -9.80000000000000032e133Initial program 82.5%
associate-*l/88.2%
Simplified88.2%
Taylor expanded in x around 0 65.4%
associate-*l/79.7%
Applied egg-rr79.7%
Taylor expanded in t around 0 58.4%
*-commutative58.4%
clear-num58.5%
un-div-inv58.5%
Applied egg-rr58.5%
if -9.80000000000000032e133 < z Initial program 89.0%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in t around inf 63.7%
Final simplification63.1%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.95e+164) y (if (<= y 1e+214) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.95e+164) {
tmp = y;
} else if (y <= 1e+214) {
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 (y <= (-1.95d+164)) then
tmp = y
else if (y <= 1d+214) 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 (y <= -1.95e+164) {
tmp = y;
} else if (y <= 1e+214) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.95e+164: tmp = y elif y <= 1e+214: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.95e+164) tmp = y; elseif (y <= 1e+214) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.95e+164) tmp = y; elseif (y <= 1e+214) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.95e+164], y, If[LessEqual[y, 1e+214], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+164}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 10^{+214}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.94999999999999993e164 or 9.9999999999999995e213 < y Initial program 70.8%
associate-*l/94.4%
Simplified94.4%
Taylor expanded in x around 0 54.9%
associate-*l/84.0%
Applied egg-rr84.0%
Taylor expanded in t around inf 37.7%
if -1.94999999999999993e164 < y < 9.9999999999999995e213Initial program 92.5%
associate-*l/94.3%
Simplified94.3%
Taylor expanded in x around inf 57.3%
Final simplification53.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 88.2%
associate-*l/94.4%
Simplified94.4%
Taylor expanded in t around inf 58.2%
Final simplification58.2%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 88.2%
associate-*l/94.4%
Simplified94.4%
Taylor expanded in x around inf 49.4%
Final simplification49.4%
(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 2023230
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))