
(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 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(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 (+ 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 98.8%
Final simplification98.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y a)))))
(if (<= t -1.72e+118)
(+ x y)
(if (<= t -7.2e+51)
t_1
(if (<= t -440000000000.0)
(* y (- 1.0 (/ z t)))
(if (<= t -5e-161)
(+ x (* y (/ z a)))
(if (<= t 1.5e+14) t_1 (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double tmp;
if (t <= -1.72e+118) {
tmp = x + y;
} else if (t <= -7.2e+51) {
tmp = t_1;
} else if (t <= -440000000000.0) {
tmp = y * (1.0 - (z / t));
} else if (t <= -5e-161) {
tmp = x + (y * (z / a));
} else if (t <= 1.5e+14) {
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 = x + (z * (y / a))
if (t <= (-1.72d+118)) then
tmp = x + y
else if (t <= (-7.2d+51)) then
tmp = t_1
else if (t <= (-440000000000.0d0)) then
tmp = y * (1.0d0 - (z / t))
else if (t <= (-5d-161)) then
tmp = x + (y * (z / a))
else if (t <= 1.5d+14) 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 = x + (z * (y / a));
double tmp;
if (t <= -1.72e+118) {
tmp = x + y;
} else if (t <= -7.2e+51) {
tmp = t_1;
} else if (t <= -440000000000.0) {
tmp = y * (1.0 - (z / t));
} else if (t <= -5e-161) {
tmp = x + (y * (z / a));
} else if (t <= 1.5e+14) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / a)) tmp = 0 if t <= -1.72e+118: tmp = x + y elif t <= -7.2e+51: tmp = t_1 elif t <= -440000000000.0: tmp = y * (1.0 - (z / t)) elif t <= -5e-161: tmp = x + (y * (z / a)) elif t <= 1.5e+14: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / a))) tmp = 0.0 if (t <= -1.72e+118) tmp = Float64(x + y); elseif (t <= -7.2e+51) tmp = t_1; elseif (t <= -440000000000.0) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= -5e-161) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= 1.5e+14) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / a)); tmp = 0.0; if (t <= -1.72e+118) tmp = x + y; elseif (t <= -7.2e+51) tmp = t_1; elseif (t <= -440000000000.0) tmp = y * (1.0 - (z / t)); elseif (t <= -5e-161) tmp = x + (y * (z / a)); elseif (t <= 1.5e+14) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.72e+118], N[(x + y), $MachinePrecision], If[LessEqual[t, -7.2e+51], t$95$1, If[LessEqual[t, -440000000000.0], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-161], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+14], t$95$1, N[(x + y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -1.72 \cdot 10^{+118}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -440000000000:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-161}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.71999999999999999e118 or 1.5e14 < t Initial program 99.9%
Taylor expanded in t around inf 83.0%
if -1.71999999999999999e118 < t < -7.20000000000000022e51 or -4.9999999999999999e-161 < t < 1.5e14Initial program 97.2%
Taylor expanded in t around 0 71.2%
associate-/l*76.3%
associate-/r/78.3%
Simplified78.3%
if -7.20000000000000022e51 < t < -4.4e11Initial program 100.0%
Taylor expanded in a around 0 99.3%
associate-*r/99.3%
neg-mul-199.3%
distribute-rgt-neg-in99.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around inf 73.8%
if -4.4e11 < t < -4.9999999999999999e-161Initial program 99.9%
Taylor expanded in t around 0 77.3%
Final simplification80.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y a)))))
(if (<= t -1.75e+118)
(+ x y)
(if (<= t -9e+51)
t_1
(if (<= t -440000000000.0)
(* y (- 1.0 (/ z t)))
(if (<= t -1.65e-162)
(+ x (/ y (/ a z)))
(if (<= t 1.6e+15) t_1 (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double tmp;
if (t <= -1.75e+118) {
tmp = x + y;
} else if (t <= -9e+51) {
tmp = t_1;
} else if (t <= -440000000000.0) {
tmp = y * (1.0 - (z / t));
} else if (t <= -1.65e-162) {
tmp = x + (y / (a / z));
} else if (t <= 1.6e+15) {
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 = x + (z * (y / a))
if (t <= (-1.75d+118)) then
tmp = x + y
else if (t <= (-9d+51)) then
tmp = t_1
else if (t <= (-440000000000.0d0)) then
tmp = y * (1.0d0 - (z / t))
else if (t <= (-1.65d-162)) then
tmp = x + (y / (a / z))
else if (t <= 1.6d+15) 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 = x + (z * (y / a));
double tmp;
if (t <= -1.75e+118) {
tmp = x + y;
} else if (t <= -9e+51) {
tmp = t_1;
} else if (t <= -440000000000.0) {
tmp = y * (1.0 - (z / t));
} else if (t <= -1.65e-162) {
tmp = x + (y / (a / z));
} else if (t <= 1.6e+15) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / a)) tmp = 0 if t <= -1.75e+118: tmp = x + y elif t <= -9e+51: tmp = t_1 elif t <= -440000000000.0: tmp = y * (1.0 - (z / t)) elif t <= -1.65e-162: tmp = x + (y / (a / z)) elif t <= 1.6e+15: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / a))) tmp = 0.0 if (t <= -1.75e+118) tmp = Float64(x + y); elseif (t <= -9e+51) tmp = t_1; elseif (t <= -440000000000.0) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= -1.65e-162) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (t <= 1.6e+15) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / a)); tmp = 0.0; if (t <= -1.75e+118) tmp = x + y; elseif (t <= -9e+51) tmp = t_1; elseif (t <= -440000000000.0) tmp = y * (1.0 - (z / t)); elseif (t <= -1.65e-162) tmp = x + (y / (a / z)); elseif (t <= 1.6e+15) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.75e+118], N[(x + y), $MachinePrecision], If[LessEqual[t, -9e+51], t$95$1, If[LessEqual[t, -440000000000.0], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.65e-162], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e+15], t$95$1, N[(x + y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{+118}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -9 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -440000000000:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-162}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.75000000000000008e118 or 1.6e15 < t Initial program 99.9%
Taylor expanded in t around inf 83.0%
if -1.75000000000000008e118 < t < -8.9999999999999999e51 or -1.65000000000000007e-162 < t < 1.6e15Initial program 97.2%
Taylor expanded in t around 0 71.2%
associate-/l*76.3%
associate-/r/78.3%
Simplified78.3%
if -8.9999999999999999e51 < t < -4.4e11Initial program 100.0%
Taylor expanded in a around 0 99.3%
associate-*r/99.3%
neg-mul-199.3%
distribute-rgt-neg-in99.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around inf 73.8%
if -4.4e11 < t < -1.65000000000000007e-162Initial program 99.9%
Taylor expanded in t around 0 71.9%
associate-/l*77.5%
Simplified77.5%
Final simplification80.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.7e+185)
(+ x y)
(if (<= t -25500000000.0)
(- x (* y (/ z t)))
(if (<= t 6500000000000.0) (+ x (* z (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.7e+185) {
tmp = x + y;
} else if (t <= -25500000000.0) {
tmp = x - (y * (z / t));
} else if (t <= 6500000000000.0) {
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+185)) then
tmp = x + y
else if (t <= (-25500000000.0d0)) then
tmp = x - (y * (z / t))
else if (t <= 6500000000000.0d0) 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+185) {
tmp = x + y;
} else if (t <= -25500000000.0) {
tmp = x - (y * (z / t));
} else if (t <= 6500000000000.0) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.7e+185: tmp = x + y elif t <= -25500000000.0: tmp = x - (y * (z / t)) elif t <= 6500000000000.0: 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+185) tmp = Float64(x + y); elseif (t <= -25500000000.0) tmp = Float64(x - Float64(y * Float64(z / t))); elseif (t <= 6500000000000.0) 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+185) tmp = x + y; elseif (t <= -25500000000.0) tmp = x - (y * (z / t)); elseif (t <= 6500000000000.0) 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+185], N[(x + y), $MachinePrecision], If[LessEqual[t, -25500000000.0], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6500000000000.0], 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^{+185}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -25500000000:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 6500000000000:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -2.70000000000000007e185 or 6.5e12 < t Initial program 99.9%
Taylor expanded in t around inf 85.0%
if -2.70000000000000007e185 < t < -2.55e10Initial program 99.9%
Taylor expanded in z around inf 81.8%
Taylor expanded in a around 0 76.7%
associate-*r/76.7%
mul-1-neg76.7%
distribute-rgt-neg-out76.7%
Simplified76.7%
Taylor expanded in x around 0 76.7%
+-commutative76.7%
mul-1-neg76.7%
associate-/l*77.0%
sub-neg77.0%
associate-/l*76.7%
associate-*r/76.9%
Simplified76.9%
if -2.55e10 < t < 6.5e12Initial program 97.6%
Taylor expanded in t around 0 71.1%
associate-/l*77.0%
associate-/r/77.1%
Simplified77.1%
Final simplification79.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.7e+185)
(+ x y)
(if (<= t -6000000000.0)
(+ x (/ y (/ (- t) z)))
(if (<= t 4.2e+15) (+ x (* z (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.7e+185) {
tmp = x + y;
} else if (t <= -6000000000.0) {
tmp = x + (y / (-t / z));
} else if (t <= 4.2e+15) {
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+185)) then
tmp = x + y
else if (t <= (-6000000000.0d0)) then
tmp = x + (y / (-t / z))
else if (t <= 4.2d+15) 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+185) {
tmp = x + y;
} else if (t <= -6000000000.0) {
tmp = x + (y / (-t / z));
} else if (t <= 4.2e+15) {
tmp = x + (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.7e+185: tmp = x + y elif t <= -6000000000.0: tmp = x + (y / (-t / z)) elif t <= 4.2e+15: 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+185) tmp = Float64(x + y); elseif (t <= -6000000000.0) tmp = Float64(x + Float64(y / Float64(Float64(-t) / z))); elseif (t <= 4.2e+15) 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+185) tmp = x + y; elseif (t <= -6000000000.0) tmp = x + (y / (-t / z)); elseif (t <= 4.2e+15) 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+185], N[(x + y), $MachinePrecision], If[LessEqual[t, -6000000000.0], N[(x + N[(y / N[((-t) / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e+15], 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^{+185}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -6000000000:\\
\;\;\;\;x + \frac{y}{\frac{-t}{z}}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+15}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -2.70000000000000007e185 or 4.2e15 < t Initial program 99.9%
Taylor expanded in t around inf 85.0%
if -2.70000000000000007e185 < t < -6e9Initial program 99.9%
Taylor expanded in a around 0 77.7%
associate-*r/77.7%
neg-mul-177.7%
distribute-rgt-neg-in77.7%
associate-/l*82.7%
Simplified82.7%
Taylor expanded in t around 0 77.0%
associate-*r/77.0%
neg-mul-177.0%
Simplified77.0%
if -6e9 < t < 4.2e15Initial program 97.6%
Taylor expanded in t around 0 71.1%
associate-/l*77.0%
associate-/r/77.1%
Simplified77.1%
Final simplification80.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.8e+59) (not (<= z 7e-66))) (+ 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 <= -2.8e+59) || !(z <= 7e-66)) {
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 <= (-2.8d+59)) .or. (.not. (z <= 7d-66))) 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 <= -2.8e+59) || !(z <= 7e-66)) {
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 <= -2.8e+59) or not (z <= 7e-66): 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 <= -2.8e+59) || !(z <= 7e-66)) 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 <= -2.8e+59) || ~((z <= 7e-66))) 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, -2.8e+59], N[Not[LessEqual[z, 7e-66]], $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 -2.8 \cdot 10^{+59} \lor \neg \left(z \leq 7 \cdot 10^{-66}\right):\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t - a}{t}}\\
\end{array}
\end{array}
if z < -2.7999999999999998e59 or 7.0000000000000001e-66 < z Initial program 97.8%
Taylor expanded in z around inf 90.3%
if -2.7999999999999998e59 < z < 7.0000000000000001e-66Initial program 99.9%
Taylor expanded in z around 0 92.0%
neg-mul-192.0%
distribute-neg-frac92.0%
Simplified92.0%
Taylor expanded in y around 0 79.3%
associate-*r/79.3%
neg-mul-179.3%
distribute-rgt-neg-in79.3%
associate-/l*92.0%
Simplified92.0%
frac-2neg92.0%
remove-double-neg92.0%
associate-/r/86.5%
sub-neg86.5%
distribute-neg-in86.5%
remove-double-neg86.5%
Applied egg-rr86.5%
associate-*l/79.3%
associate-/l*92.0%
+-commutative92.0%
unsub-neg92.0%
Simplified92.0%
Final simplification91.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4e+59) (not (<= z 4.5e-66))) (+ 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 <= -4e+59) || !(z <= 4.5e-66)) {
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 <= (-4d+59)) .or. (.not. (z <= 4.5d-66))) 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 <= -4e+59) || !(z <= 4.5e-66)) {
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 <= -4e+59) or not (z <= 4.5e-66): 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 <= -4e+59) || !(z <= 4.5e-66)) tmp = Float64(x + Float64(y * Float64(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 ((z <= -4e+59) || ~((z <= 4.5e-66))) 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, -4e+59], N[Not[LessEqual[z, 4.5e-66]], $MachinePrecision]], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+59} \lor \neg \left(z \leq 4.5 \cdot 10^{-66}\right):\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t}{a - t}\\
\end{array}
\end{array}
if z < -3.99999999999999989e59 or 4.4999999999999998e-66 < z Initial program 97.8%
Taylor expanded in z around inf 90.3%
if -3.99999999999999989e59 < z < 4.4999999999999998e-66Initial program 99.9%
Taylor expanded in z around 0 92.0%
neg-mul-192.0%
distribute-neg-frac92.0%
Simplified92.0%
Final simplification91.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.7e+185) (+ x y) (if (<= t 4e+121) (+ x (* y (/ z (- a t)))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.7e+185) {
tmp = x + y;
} else if (t <= 4e+121) {
tmp = x + (y * (z / (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 (t <= (-2.7d+185)) then
tmp = x + y
else if (t <= 4d+121) then
tmp = x + (y * (z / (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 (t <= -2.7e+185) {
tmp = x + y;
} else if (t <= 4e+121) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.7e+185: tmp = x + y elif t <= 4e+121: tmp = x + (y * (z / (a - t))) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.7e+185) tmp = Float64(x + y); elseif (t <= 4e+121) tmp = Float64(x + Float64(y * Float64(z / 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 (t <= -2.7e+185) tmp = x + y; elseif (t <= 4e+121) tmp = x + (y * (z / (a - t))); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.7e+185], N[(x + y), $MachinePrecision], If[LessEqual[t, 4e+121], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{+185}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+121}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -2.70000000000000007e185 or 4.00000000000000015e121 < t Initial program 100.0%
Taylor expanded in t around inf 91.1%
if -2.70000000000000007e185 < t < 4.00000000000000015e121Initial program 98.4%
Taylor expanded in z around inf 85.8%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.6e+185) (+ x (+ y (/ y (/ t a)))) (if (<= t 1.55e+122) (+ x (* y (/ z (- a t)))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.6e+185) {
tmp = x + (y + (y / (t / a)));
} else if (t <= 1.55e+122) {
tmp = x + (y * (z / (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 (t <= (-3.6d+185)) then
tmp = x + (y + (y / (t / a)))
else if (t <= 1.55d+122) then
tmp = x + (y * (z / (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 (t <= -3.6e+185) {
tmp = x + (y + (y / (t / a)));
} else if (t <= 1.55e+122) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.6e+185: tmp = x + (y + (y / (t / a))) elif t <= 1.55e+122: tmp = x + (y * (z / (a - t))) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.6e+185) tmp = Float64(x + Float64(y + Float64(y / Float64(t / a)))); elseif (t <= 1.55e+122) tmp = Float64(x + Float64(y * Float64(z / 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 (t <= -3.6e+185) tmp = x + (y + (y / (t / a))); elseif (t <= 1.55e+122) tmp = x + (y * (z / (a - t))); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.6e+185], N[(x + N[(y + N[(y / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e+122], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{+185}:\\
\;\;\;\;x + \left(y + \frac{y}{\frac{t}{a}}\right)\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+122}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -3.60000000000000029e185Initial program 100.0%
Taylor expanded in z around 0 93.2%
neg-mul-193.2%
distribute-neg-frac93.2%
Simplified93.2%
Taylor expanded in t around inf 82.7%
+-commutative82.7%
*-commutative82.7%
associate-/l*93.2%
Simplified93.2%
if -3.60000000000000029e185 < t < 1.54999999999999999e122Initial program 98.4%
Taylor expanded in z around inf 85.8%
if 1.54999999999999999e122 < t Initial program 99.9%
Taylor expanded in t around inf 90.6%
Final simplification87.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.32e+209) (not (<= y 6.6e+213))) (* y (- 1.0 (/ z t))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.32e+209) || !(y <= 6.6e+213)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.32d+209)) .or. (.not. (y <= 6.6d+213))) then
tmp = y * (1.0d0 - (z / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.32e+209) || !(y <= 6.6e+213)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.32e+209) or not (y <= 6.6e+213): tmp = y * (1.0 - (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.32e+209) || !(y <= 6.6e+213)) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.32e+209) || ~((y <= 6.6e+213))) tmp = y * (1.0 - (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.32e+209], N[Not[LessEqual[y, 6.6e+213]], $MachinePrecision]], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.32 \cdot 10^{+209} \lor \neg \left(y \leq 6.6 \cdot 10^{+213}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < -1.32e209 or 6.6000000000000002e213 < y Initial program 99.9%
Taylor expanded in a around 0 52.3%
associate-*r/52.3%
neg-mul-152.3%
distribute-rgt-neg-in52.3%
associate-/l*70.5%
Simplified70.5%
Taylor expanded in y around inf 70.5%
if -1.32e209 < y < 6.6000000000000002e213Initial program 98.6%
Taylor expanded in t around inf 71.4%
Final simplification71.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.8e+118) (+ x y) (if (<= t 2.8e+14) (+ x (* y (/ z a))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.8e+118) {
tmp = x + y;
} else if (t <= 2.8e+14) {
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 <= (-1.8d+118)) then
tmp = x + y
else if (t <= 2.8d+14) 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 <= -1.8e+118) {
tmp = x + y;
} else if (t <= 2.8e+14) {
tmp = x + (y * (z / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.8e+118: tmp = x + y elif t <= 2.8e+14: tmp = x + (y * (z / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.8e+118) tmp = Float64(x + y); elseif (t <= 2.8e+14) 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 <= -1.8e+118) tmp = x + y; elseif (t <= 2.8e+14) tmp = x + (y * (z / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.8e+118], N[(x + y), $MachinePrecision], If[LessEqual[t, 2.8e+14], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+118}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+14}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.8e118 or 2.8e14 < t Initial program 99.9%
Taylor expanded in t around inf 83.0%
if -1.8e118 < t < 2.8e14Initial program 98.0%
Taylor expanded in t around 0 73.7%
Final simplification77.8%
(FPCore (x y z t a) :precision binary64 (if (<= a 1.7e-297) (+ x y) (if (<= a 4.1e-165) (/ (* y (- z)) t) (if (<= a 1.1e+83) (+ x y) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 1.7e-297) {
tmp = x + y;
} else if (a <= 4.1e-165) {
tmp = (y * -z) / t;
} else if (a <= 1.1e+83) {
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 <= 1.7d-297) then
tmp = x + y
else if (a <= 4.1d-165) then
tmp = (y * -z) / t
else if (a <= 1.1d+83) 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 <= 1.7e-297) {
tmp = x + y;
} else if (a <= 4.1e-165) {
tmp = (y * -z) / t;
} else if (a <= 1.1e+83) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 1.7e-297: tmp = x + y elif a <= 4.1e-165: tmp = (y * -z) / t elif a <= 1.1e+83: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 1.7e-297) tmp = Float64(x + y); elseif (a <= 4.1e-165) tmp = Float64(Float64(y * Float64(-z)) / t); elseif (a <= 1.1e+83) 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 <= 1.7e-297) tmp = x + y; elseif (a <= 4.1e-165) tmp = (y * -z) / t; elseif (a <= 1.1e+83) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 1.7e-297], N[(x + y), $MachinePrecision], If[LessEqual[a, 4.1e-165], N[(N[(y * (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, 1.1e+83], N[(x + y), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.7 \cdot 10^{-297}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{-165}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{+83}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < 1.69999999999999991e-297 or 4.1000000000000002e-165 < a < 1.09999999999999999e83Initial program 99.4%
Taylor expanded in t around inf 71.9%
if 1.69999999999999991e-297 < a < 4.1000000000000002e-165Initial program 94.3%
Taylor expanded in a around 0 90.8%
associate-*r/90.8%
neg-mul-190.8%
distribute-rgt-neg-in90.8%
associate-/l*86.3%
Simplified86.3%
Taylor expanded in y around inf 65.6%
Taylor expanded in z around inf 59.5%
mul-1-neg59.5%
associate-*r/54.9%
Simplified54.9%
Taylor expanded in y around 0 59.5%
if 1.09999999999999999e83 < a Initial program 99.9%
Taylor expanded in t around 0 75.5%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in x around inf 69.2%
Final simplification69.8%
(FPCore (x y z t a) :precision binary64 (if (<= y 1.5e+266) (+ x y) (* y (/ (- z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.5e+266) {
tmp = x + y;
} else {
tmp = y * (-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 (y <= 1.5d+266) then
tmp = x + y
else
tmp = y * (-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 (y <= 1.5e+266) {
tmp = x + y;
} else {
tmp = y * (-z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 1.5e+266: tmp = x + y else: tmp = y * (-z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 1.5e+266) tmp = Float64(x + y); else tmp = Float64(y * Float64(Float64(-z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 1.5e+266) tmp = x + y; else tmp = y * (-z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.5e+266], N[(x + y), $MachinePrecision], N[(y * N[((-z) / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.5 \cdot 10^{+266}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-z}{t}\\
\end{array}
\end{array}
if y < 1.4999999999999999e266Initial program 98.8%
Taylor expanded in t around inf 66.4%
if 1.4999999999999999e266 < y Initial program 99.7%
Taylor expanded in a around 0 61.4%
associate-*r/61.4%
neg-mul-161.4%
distribute-rgt-neg-in61.4%
associate-/l*73.6%
Simplified73.6%
Taylor expanded in y around inf 73.7%
Taylor expanded in z around inf 60.9%
mul-1-neg60.9%
associate-*r/68.0%
Simplified68.0%
Final simplification66.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 98.8%
Taylor expanded in t around inf 63.7%
Final simplification63.7%
(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 98.8%
Taylor expanded in t around 0 58.1%
associate-/l*61.3%
Simplified61.3%
Taylor expanded in x around inf 51.6%
Final simplification51.6%
(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 2023274
(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)))))