
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
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) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
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) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
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) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Initial program 98.4%
Final simplification98.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ t a)))))
(if (<= z -5.4e+14)
(+ x y)
(if (<= z 1.8e-65)
t_1
(if (<= z 4200.0)
(* y (- 1.0 (/ t z)))
(if (<= z 9.8e+123) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (t / a));
double tmp;
if (z <= -5.4e+14) {
tmp = x + y;
} else if (z <= 1.8e-65) {
tmp = t_1;
} else if (z <= 4200.0) {
tmp = y * (1.0 - (t / z));
} else if (z <= 9.8e+123) {
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 + (y * (t / a))
if (z <= (-5.4d+14)) then
tmp = x + y
else if (z <= 1.8d-65) then
tmp = t_1
else if (z <= 4200.0d0) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 9.8d+123) 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 + (y * (t / a));
double tmp;
if (z <= -5.4e+14) {
tmp = x + y;
} else if (z <= 1.8e-65) {
tmp = t_1;
} else if (z <= 4200.0) {
tmp = y * (1.0 - (t / z));
} else if (z <= 9.8e+123) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (t / a)) tmp = 0 if z <= -5.4e+14: tmp = x + y elif z <= 1.8e-65: tmp = t_1 elif z <= 4200.0: tmp = y * (1.0 - (t / z)) elif z <= 9.8e+123: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(t / a))) tmp = 0.0 if (z <= -5.4e+14) tmp = Float64(x + y); elseif (z <= 1.8e-65) tmp = t_1; elseif (z <= 4200.0) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 9.8e+123) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (t / a)); tmp = 0.0; if (z <= -5.4e+14) tmp = x + y; elseif (z <= 1.8e-65) tmp = t_1; elseif (z <= 4200.0) tmp = y * (1.0 - (t / z)); elseif (z <= 9.8e+123) 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[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e+14], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.8e-65], t$95$1, If[LessEqual[z, 4200.0], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.8e+123], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{t}{a}\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{+14}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-65}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4200:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+123}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -5.4e14 or 9.79999999999999952e123 < z Initial program 99.9%
+-commutative99.9%
associate-*r/67.3%
associate-*l/97.2%
fma-def97.2%
Simplified97.2%
Taylor expanded in z around inf 75.9%
if -5.4e14 < z < 1.7999999999999999e-65 or 4200 < z < 9.79999999999999952e123Initial program 97.3%
Taylor expanded in z around 0 83.2%
if 1.7999999999999999e-65 < z < 4200Initial program 99.8%
+-commutative99.8%
associate-*r/99.6%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 90.2%
+-commutative90.2%
*-commutative90.2%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in y around inf 86.5%
Final simplification80.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.5e+14)
(+ x y)
(if (<= z 1.8e-65)
(+ x (* y (/ t a)))
(if (<= z 4200.0)
(* y (- 1.0 (/ t z)))
(if (<= z 9.8e+123) (+ x (* t (/ y a))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e+14) {
tmp = x + y;
} else if (z <= 1.8e-65) {
tmp = x + (y * (t / a));
} else if (z <= 4200.0) {
tmp = y * (1.0 - (t / z));
} else if (z <= 9.8e+123) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5.5d+14)) then
tmp = x + y
else if (z <= 1.8d-65) then
tmp = x + (y * (t / a))
else if (z <= 4200.0d0) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 9.8d+123) then
tmp = x + (t * (y / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e+14) {
tmp = x + y;
} else if (z <= 1.8e-65) {
tmp = x + (y * (t / a));
} else if (z <= 4200.0) {
tmp = y * (1.0 - (t / z));
} else if (z <= 9.8e+123) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.5e+14: tmp = x + y elif z <= 1.8e-65: tmp = x + (y * (t / a)) elif z <= 4200.0: tmp = y * (1.0 - (t / z)) elif z <= 9.8e+123: tmp = x + (t * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.5e+14) tmp = Float64(x + y); elseif (z <= 1.8e-65) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 4200.0) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 9.8e+123) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.5e+14) tmp = x + y; elseif (z <= 1.8e-65) tmp = x + (y * (t / a)); elseif (z <= 4200.0) tmp = y * (1.0 - (t / z)); elseif (z <= 9.8e+123) tmp = x + (t * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.5e+14], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.8e-65], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4200.0], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.8e+123], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+14}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-65}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 4200:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+123}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -5.5e14 or 9.79999999999999952e123 < z Initial program 99.9%
+-commutative99.9%
associate-*r/67.3%
associate-*l/97.2%
fma-def97.2%
Simplified97.2%
Taylor expanded in z around inf 75.9%
if -5.5e14 < z < 1.7999999999999999e-65Initial program 96.8%
Taylor expanded in z around 0 85.1%
if 1.7999999999999999e-65 < z < 4200Initial program 99.8%
+-commutative99.8%
associate-*r/99.6%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 90.2%
+-commutative90.2%
*-commutative90.2%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in y around inf 86.5%
if 4200 < z < 9.79999999999999952e123Initial program 99.9%
+-commutative99.9%
associate-*r/87.6%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in z around 0 65.0%
associate-/l*73.1%
Simplified73.1%
associate-/r/73.2%
Applied egg-rr73.2%
Final simplification80.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -14000000000000.0)
(+ x y)
(if (<= z 1.8e-65)
(+ x (/ y (/ a t)))
(if (<= z 4800.0)
(* y (- 1.0 (/ t z)))
(if (<= z 1.55e+124) (+ x (* t (/ y a))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -14000000000000.0) {
tmp = x + y;
} else if (z <= 1.8e-65) {
tmp = x + (y / (a / t));
} else if (z <= 4800.0) {
tmp = y * (1.0 - (t / z));
} else if (z <= 1.55e+124) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-14000000000000.0d0)) then
tmp = x + y
else if (z <= 1.8d-65) then
tmp = x + (y / (a / t))
else if (z <= 4800.0d0) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 1.55d+124) then
tmp = x + (t * (y / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -14000000000000.0) {
tmp = x + y;
} else if (z <= 1.8e-65) {
tmp = x + (y / (a / t));
} else if (z <= 4800.0) {
tmp = y * (1.0 - (t / z));
} else if (z <= 1.55e+124) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -14000000000000.0: tmp = x + y elif z <= 1.8e-65: tmp = x + (y / (a / t)) elif z <= 4800.0: tmp = y * (1.0 - (t / z)) elif z <= 1.55e+124: tmp = x + (t * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -14000000000000.0) tmp = Float64(x + y); elseif (z <= 1.8e-65) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 4800.0) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 1.55e+124) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -14000000000000.0) tmp = x + y; elseif (z <= 1.8e-65) tmp = x + (y / (a / t)); elseif (z <= 4800.0) tmp = y * (1.0 - (t / z)); elseif (z <= 1.55e+124) tmp = x + (t * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -14000000000000.0], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.8e-65], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4800.0], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+124], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -14000000000000:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-65}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 4800:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+124}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.4e13 or 1.5500000000000001e124 < z Initial program 99.9%
+-commutative99.9%
associate-*r/67.3%
associate-*l/97.2%
fma-def97.2%
Simplified97.2%
Taylor expanded in z around inf 75.9%
if -1.4e13 < z < 1.7999999999999999e-65Initial program 96.8%
+-commutative96.8%
associate-*r/93.1%
associate-*l/96.1%
fma-def96.1%
Simplified96.1%
Taylor expanded in z around 0 80.7%
associate-/l*85.2%
Simplified85.2%
if 1.7999999999999999e-65 < z < 4800Initial program 99.8%
+-commutative99.8%
associate-*r/99.6%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 90.2%
+-commutative90.2%
*-commutative90.2%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in y around inf 86.5%
if 4800 < z < 1.5500000000000001e124Initial program 99.9%
+-commutative99.9%
associate-*r/87.6%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in z around 0 65.0%
associate-/l*73.1%
Simplified73.1%
associate-/r/73.2%
Applied egg-rr73.2%
Final simplification80.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))))
(if (<= z -2.8e-17)
t_1
(if (<= z 2.15e-86)
(+ x (/ y (/ a t)))
(if (<= z 3e+213) (+ x (/ y (/ (- z) t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -2.8e-17) {
tmp = t_1;
} else if (z <= 2.15e-86) {
tmp = x + (y / (a / t));
} else if (z <= 3e+213) {
tmp = x + (y / (-z / 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 / (z - a)))
if (z <= (-2.8d-17)) then
tmp = t_1
else if (z <= 2.15d-86) then
tmp = x + (y / (a / t))
else if (z <= 3d+213) then
tmp = x + (y / (-z / 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 / (z - a)));
double tmp;
if (z <= -2.8e-17) {
tmp = t_1;
} else if (z <= 2.15e-86) {
tmp = x + (y / (a / t));
} else if (z <= 3e+213) {
tmp = x + (y / (-z / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (z - a))) tmp = 0 if z <= -2.8e-17: tmp = t_1 elif z <= 2.15e-86: tmp = x + (y / (a / t)) elif z <= 3e+213: tmp = x + (y / (-z / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(z - a)))) tmp = 0.0 if (z <= -2.8e-17) tmp = t_1; elseif (z <= 2.15e-86) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 3e+213) tmp = Float64(x + Float64(y / Float64(Float64(-z) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (z - a))); tmp = 0.0; if (z <= -2.8e-17) tmp = t_1; elseif (z <= 2.15e-86) tmp = x + (y / (a / t)); elseif (z <= 3e+213) tmp = x + (y / (-z / 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[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e-17], t$95$1, If[LessEqual[z, 2.15e-86], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+213], N[(x + N[(y / N[((-z) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-86}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+213}:\\
\;\;\;\;x + \frac{y}{\frac{-z}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.7999999999999999e-17 or 3.0000000000000001e213 < z Initial program 99.9%
Taylor expanded in t around 0 83.6%
if -2.7999999999999999e-17 < z < 2.15000000000000007e-86Initial program 96.5%
+-commutative96.5%
associate-*r/92.4%
associate-*l/95.8%
fma-def95.7%
Simplified95.7%
Taylor expanded in z around 0 81.4%
associate-/l*86.2%
Simplified86.2%
if 2.15000000000000007e-86 < z < 3.0000000000000001e213Initial program 99.8%
+-commutative99.8%
associate-*r/90.8%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 78.9%
+-commutative78.9%
*-commutative78.9%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in z around 0 80.3%
associate-*r/80.3%
neg-mul-180.3%
Simplified80.3%
Final simplification84.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- z t) (/ z y)))))
(if (<= z -2.35e+110)
t_1
(if (<= z -9e-15)
(+ x (* y (/ z (- z a))))
(if (<= z 6.2e-68) (+ x (/ y (/ a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - t) / (z / y));
double tmp;
if (z <= -2.35e+110) {
tmp = t_1;
} else if (z <= -9e-15) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 6.2e-68) {
tmp = x + (y / (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 + ((z - t) / (z / y))
if (z <= (-2.35d+110)) then
tmp = t_1
else if (z <= (-9d-15)) then
tmp = x + (y * (z / (z - a)))
else if (z <= 6.2d-68) then
tmp = x + (y / (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 + ((z - t) / (z / y));
double tmp;
if (z <= -2.35e+110) {
tmp = t_1;
} else if (z <= -9e-15) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 6.2e-68) {
tmp = x + (y / (a / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - t) / (z / y)) tmp = 0 if z <= -2.35e+110: tmp = t_1 elif z <= -9e-15: tmp = x + (y * (z / (z - a))) elif z <= 6.2e-68: tmp = x + (y / (a / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - t) / Float64(z / y))) tmp = 0.0 if (z <= -2.35e+110) tmp = t_1; elseif (z <= -9e-15) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (z <= 6.2e-68) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z - t) / (z / y)); tmp = 0.0; if (z <= -2.35e+110) tmp = t_1; elseif (z <= -9e-15) tmp = x + (y * (z / (z - a))); elseif (z <= 6.2e-68) tmp = x + (y / (a / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.35e+110], t$95$1, If[LessEqual[z, -9e-15], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e-68], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - t}{\frac{z}{y}}\\
\mathbf{if}\;z \leq -2.35 \cdot 10^{+110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-15}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-68}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.3499999999999999e110 or 6.1999999999999999e-68 < z Initial program 99.9%
associate-*r/74.0%
associate-*l/97.5%
clear-num97.3%
associate-*l/97.4%
*-un-lft-identity97.4%
Applied egg-rr97.4%
Taylor expanded in z around inf 88.4%
if -2.3499999999999999e110 < z < -8.9999999999999995e-15Initial program 99.8%
Taylor expanded in t around 0 87.5%
if -8.9999999999999995e-15 < z < 6.1999999999999999e-68Initial program 96.6%
+-commutative96.6%
associate-*r/92.7%
associate-*l/95.9%
fma-def95.9%
Simplified95.9%
Taylor expanded in z around 0 81.2%
associate-/l*85.9%
Simplified85.9%
Final simplification87.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))))
(if (<= z -2.35e+110)
t_1
(if (<= z -3.4e-17)
(+ x (* y (/ z (- z a))))
(if (<= z 1.1e-66) (+ x (/ y (/ a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -2.35e+110) {
tmp = t_1;
} else if (z <= -3.4e-17) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 1.1e-66) {
tmp = x + (y / (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 * (1.0d0 - (t / z)))
if (z <= (-2.35d+110)) then
tmp = t_1
else if (z <= (-3.4d-17)) then
tmp = x + (y * (z / (z - a)))
else if (z <= 1.1d-66) then
tmp = x + (y / (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 * (1.0 - (t / z)));
double tmp;
if (z <= -2.35e+110) {
tmp = t_1;
} else if (z <= -3.4e-17) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 1.1e-66) {
tmp = x + (y / (a / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -2.35e+110: tmp = t_1 elif z <= -3.4e-17: tmp = x + (y * (z / (z - a))) elif z <= 1.1e-66: tmp = x + (y / (a / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -2.35e+110) tmp = t_1; elseif (z <= -3.4e-17) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (z <= 1.1e-66) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -2.35e+110) tmp = t_1; elseif (z <= -3.4e-17) tmp = x + (y * (z / (z - a))); elseif (z <= 1.1e-66) tmp = x + (y / (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[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.35e+110], t$95$1, If[LessEqual[z, -3.4e-17], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e-66], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -2.35 \cdot 10^{+110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-17}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-66}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.3499999999999999e110 or 1.1000000000000001e-66 < z Initial program 99.9%
+-commutative99.9%
associate-*r/74.0%
associate-*l/97.5%
fma-def97.5%
Simplified97.5%
Taylor expanded in a around 0 68.4%
+-commutative68.4%
associate-/l*88.4%
associate-/r/90.1%
div-sub90.1%
*-inverses90.1%
Simplified90.1%
if -2.3499999999999999e110 < z < -3.3999999999999998e-17Initial program 99.8%
Taylor expanded in t around 0 87.5%
if -3.3999999999999998e-17 < z < 1.1000000000000001e-66Initial program 96.6%
+-commutative96.6%
associate-*r/92.7%
associate-*l/95.9%
fma-def95.9%
Simplified95.9%
Taylor expanded in z around 0 81.2%
associate-/l*85.9%
Simplified85.9%
Final simplification87.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.85e+112)
(+ x (* y (- 1.0 (/ t z))))
(if (<= z -1.96e-13)
(+ x (* y (/ z (- z a))))
(if (<= z 6e-67) (+ x (/ y (/ a t))) (+ x (/ y (/ z (- z t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.85e+112) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= -1.96e-13) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 6e-67) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y / (z / (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 (z <= (-2.85d+112)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= (-1.96d-13)) then
tmp = x + (y * (z / (z - a)))
else if (z <= 6d-67) then
tmp = x + (y / (a / t))
else
tmp = x + (y / (z / (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 (z <= -2.85e+112) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= -1.96e-13) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 6e-67) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y / (z / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.85e+112: tmp = x + (y * (1.0 - (t / z))) elif z <= -1.96e-13: tmp = x + (y * (z / (z - a))) elif z <= 6e-67: tmp = x + (y / (a / t)) else: tmp = x + (y / (z / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.85e+112) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= -1.96e-13) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (z <= 6e-67) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.85e+112) tmp = x + (y * (1.0 - (t / z))); elseif (z <= -1.96e-13) tmp = x + (y * (z / (z - a))); elseif (z <= 6e-67) tmp = x + (y / (a / t)); else tmp = x + (y / (z / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.85e+112], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.96e-13], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-67], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.85 \cdot 10^{+112}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq -1.96 \cdot 10^{-13}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-67}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\end{array}
\end{array}
if z < -2.85000000000000016e112Initial program 100.0%
+-commutative100.0%
associate-*r/64.2%
associate-*l/97.6%
fma-def97.6%
Simplified97.6%
Taylor expanded in a around 0 64.2%
+-commutative64.2%
associate-/l*93.1%
associate-/r/95.6%
div-sub95.6%
*-inverses95.6%
Simplified95.6%
if -2.85000000000000016e112 < z < -1.95999999999999998e-13Initial program 99.8%
Taylor expanded in t around 0 87.5%
if -1.95999999999999998e-13 < z < 6.00000000000000065e-67Initial program 96.6%
+-commutative96.6%
associate-*r/92.7%
associate-*l/95.9%
fma-def95.9%
Simplified95.9%
Taylor expanded in z around 0 81.2%
associate-/l*85.9%
Simplified85.9%
if 6.00000000000000065e-67 < z Initial program 99.9%
+-commutative99.9%
associate-*r/80.1%
associate-*l/97.4%
fma-def97.4%
Simplified97.4%
Taylor expanded in a around 0 71.0%
+-commutative71.0%
*-commutative71.0%
associate-/l*86.7%
Simplified86.7%
Final simplification87.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.85e+110)
(+ x (* y (- 1.0 (/ t z))))
(if (<= z -2.3e-15)
(+ x (* y (/ z (- z a))))
(if (<= z 2.25e+101)
(- x (* y (/ t (- z a))))
(+ x (/ y (/ z (- z t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.85e+110) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= -2.3e-15) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 2.25e+101) {
tmp = x - (y * (t / (z - a)));
} else {
tmp = x + (y / (z / (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 (z <= (-1.85d+110)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= (-2.3d-15)) then
tmp = x + (y * (z / (z - a)))
else if (z <= 2.25d+101) then
tmp = x - (y * (t / (z - a)))
else
tmp = x + (y / (z / (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 (z <= -1.85e+110) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= -2.3e-15) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 2.25e+101) {
tmp = x - (y * (t / (z - a)));
} else {
tmp = x + (y / (z / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.85e+110: tmp = x + (y * (1.0 - (t / z))) elif z <= -2.3e-15: tmp = x + (y * (z / (z - a))) elif z <= 2.25e+101: tmp = x - (y * (t / (z - a))) else: tmp = x + (y / (z / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.85e+110) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= -2.3e-15) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (z <= 2.25e+101) tmp = Float64(x - Float64(y * Float64(t / Float64(z - a)))); else tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.85e+110) tmp = x + (y * (1.0 - (t / z))); elseif (z <= -2.3e-15) tmp = x + (y * (z / (z - a))); elseif (z <= 2.25e+101) tmp = x - (y * (t / (z - a))); else tmp = x + (y / (z / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.85e+110], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e-15], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+101], N[(x - N[(y * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+110}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-15}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+101}:\\
\;\;\;\;x - y \cdot \frac{t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\end{array}
\end{array}
if z < -1.85000000000000006e110Initial program 100.0%
+-commutative100.0%
associate-*r/64.2%
associate-*l/97.6%
fma-def97.6%
Simplified97.6%
Taylor expanded in a around 0 64.2%
+-commutative64.2%
associate-/l*93.1%
associate-/r/95.6%
div-sub95.6%
*-inverses95.6%
Simplified95.6%
if -1.85000000000000006e110 < z < -2.2999999999999999e-15Initial program 99.8%
Taylor expanded in t around 0 87.5%
if -2.2999999999999999e-15 < z < 2.2500000000000001e101Initial program 97.3%
associate-*r/93.6%
associate-*l/96.8%
clear-num96.7%
associate-*l/96.8%
*-un-lft-identity96.8%
Applied egg-rr96.8%
Taylor expanded in t around inf 89.5%
*-commutative89.5%
associate-*l/93.2%
neg-mul-193.2%
distribute-rgt-neg-in93.2%
Simplified93.2%
distribute-rgt-neg-out93.2%
unsub-neg93.2%
Applied egg-rr93.2%
if 2.2500000000000001e101 < z Initial program 99.9%
+-commutative99.9%
associate-*r/65.7%
associate-*l/95.2%
fma-def95.2%
Simplified95.2%
Taylor expanded in a around 0 63.3%
+-commutative63.3%
*-commutative63.3%
associate-/l*92.4%
Simplified92.4%
Final simplification92.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.5e+14)
(+ x y)
(if (<= z 2.6e-87)
(+ x (/ y (/ a t)))
(if (<= z 3e+213) (+ x (/ y (/ (- z) t))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+14) {
tmp = x + y;
} else if (z <= 2.6e-87) {
tmp = x + (y / (a / t));
} else if (z <= 3e+213) {
tmp = x + (y / (-z / t));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.5d+14)) then
tmp = x + y
else if (z <= 2.6d-87) then
tmp = x + (y / (a / t))
else if (z <= 3d+213) then
tmp = x + (y / (-z / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+14) {
tmp = x + y;
} else if (z <= 2.6e-87) {
tmp = x + (y / (a / t));
} else if (z <= 3e+213) {
tmp = x + (y / (-z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e+14: tmp = x + y elif z <= 2.6e-87: tmp = x + (y / (a / t)) elif z <= 3e+213: tmp = x + (y / (-z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e+14) tmp = Float64(x + y); elseif (z <= 2.6e-87) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 3e+213) tmp = Float64(x + Float64(y / Float64(Float64(-z) / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e+14) tmp = x + y; elseif (z <= 2.6e-87) tmp = x + (y / (a / t)); elseif (z <= 3e+213) tmp = x + (y / (-z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e+14], N[(x + y), $MachinePrecision], If[LessEqual[z, 2.6e-87], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+213], N[(x + N[(y / N[((-z) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+14}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+213}:\\
\;\;\;\;x + \frac{y}{\frac{-z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -6.5e14 or 3.0000000000000001e213 < z Initial program 99.9%
+-commutative99.9%
associate-*r/65.4%
associate-*l/96.9%
fma-def96.8%
Simplified96.8%
Taylor expanded in z around inf 77.2%
if -6.5e14 < z < 2.60000000000000002e-87Initial program 96.6%
+-commutative96.6%
associate-*r/92.8%
associate-*l/96.0%
fma-def96.0%
Simplified96.0%
Taylor expanded in z around 0 80.8%
associate-/l*85.4%
Simplified85.4%
if 2.60000000000000002e-87 < z < 3.0000000000000001e213Initial program 99.8%
+-commutative99.8%
associate-*r/90.8%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 78.9%
+-commutative78.9%
*-commutative78.9%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in z around 0 80.3%
associate-*r/80.3%
neg-mul-180.3%
Simplified80.3%
Final simplification81.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -35000000000.0) (+ x y) (if (<= z 1.25e-65) x (if (<= z 7.4e+29) (* y (- 1.0 (/ t z))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -35000000000.0) {
tmp = x + y;
} else if (z <= 1.25e-65) {
tmp = x;
} else if (z <= 7.4e+29) {
tmp = y * (1.0 - (t / 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 <= (-35000000000.0d0)) then
tmp = x + y
else if (z <= 1.25d-65) then
tmp = x
else if (z <= 7.4d+29) then
tmp = y * (1.0d0 - (t / 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 <= -35000000000.0) {
tmp = x + y;
} else if (z <= 1.25e-65) {
tmp = x;
} else if (z <= 7.4e+29) {
tmp = y * (1.0 - (t / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -35000000000.0: tmp = x + y elif z <= 1.25e-65: tmp = x elif z <= 7.4e+29: tmp = y * (1.0 - (t / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -35000000000.0) tmp = Float64(x + y); elseif (z <= 1.25e-65) tmp = x; elseif (z <= 7.4e+29) tmp = Float64(y * Float64(1.0 - Float64(t / z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -35000000000.0) tmp = x + y; elseif (z <= 1.25e-65) tmp = x; elseif (z <= 7.4e+29) tmp = y * (1.0 - (t / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -35000000000.0], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.25e-65], x, If[LessEqual[z, 7.4e+29], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -35000000000:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-65}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{+29}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -3.5e10 or 7.39999999999999947e29 < z Initial program 99.9%
+-commutative99.9%
associate-*r/70.5%
associate-*l/97.6%
fma-def97.6%
Simplified97.6%
Taylor expanded in z around inf 72.6%
if -3.5e10 < z < 1.24999999999999996e-65Initial program 96.8%
+-commutative96.8%
associate-*r/93.1%
associate-*l/96.1%
fma-def96.1%
Simplified96.1%
Taylor expanded in y around 0 54.2%
if 1.24999999999999996e-65 < z < 7.39999999999999947e29Initial program 99.8%
+-commutative99.8%
associate-*r/94.7%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 77.7%
+-commutative77.7%
*-commutative77.7%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in y around inf 70.2%
Final simplification63.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.8e+14)
(+ x y)
(if (<= z 2.2e-86)
(+ x (/ y (/ a t)))
(if (<= z 4.4e+213) (- x (* y (/ t z))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8e+14) {
tmp = x + y;
} else if (z <= 2.2e-86) {
tmp = x + (y / (a / t));
} else if (z <= 4.4e+213) {
tmp = x - (y * (t / 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 <= (-2.8d+14)) then
tmp = x + y
else if (z <= 2.2d-86) then
tmp = x + (y / (a / t))
else if (z <= 4.4d+213) then
tmp = x - (y * (t / 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 <= -2.8e+14) {
tmp = x + y;
} else if (z <= 2.2e-86) {
tmp = x + (y / (a / t));
} else if (z <= 4.4e+213) {
tmp = x - (y * (t / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.8e+14: tmp = x + y elif z <= 2.2e-86: tmp = x + (y / (a / t)) elif z <= 4.4e+213: tmp = x - (y * (t / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.8e+14) tmp = Float64(x + y); elseif (z <= 2.2e-86) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 4.4e+213) tmp = Float64(x - Float64(y * Float64(t / z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.8e+14) tmp = x + y; elseif (z <= 2.2e-86) tmp = x + (y / (a / t)); elseif (z <= 4.4e+213) tmp = x - (y * (t / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8e+14], N[(x + y), $MachinePrecision], If[LessEqual[z, 2.2e-86], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+213], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+14}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-86}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+213}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.8e14 or 4.3999999999999998e213 < z Initial program 99.9%
+-commutative99.9%
associate-*r/65.4%
associate-*l/96.9%
fma-def96.8%
Simplified96.8%
Taylor expanded in z around inf 77.2%
if -2.8e14 < z < 2.2000000000000002e-86Initial program 96.6%
+-commutative96.6%
associate-*r/92.8%
associate-*l/96.0%
fma-def96.0%
Simplified96.0%
Taylor expanded in z around 0 80.8%
associate-/l*85.4%
Simplified85.4%
if 2.2000000000000002e-86 < z < 4.3999999999999998e213Initial program 99.8%
associate-*r/90.8%
associate-*l/99.9%
clear-num99.8%
associate-*l/99.9%
*-un-lft-identity99.9%
Applied egg-rr99.9%
Taylor expanded in t around inf 82.9%
*-commutative82.9%
associate-*l/88.3%
neg-mul-188.3%
distribute-rgt-neg-in88.3%
Simplified88.3%
Taylor expanded in z around inf 78.5%
+-commutative78.5%
mul-1-neg78.5%
associate-*r/80.3%
sub-neg80.3%
Simplified80.3%
Final simplification81.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -46000000000000.0)
(+ x y)
(if (<= z 2.1e-86)
(+ x (/ y (/ a t)))
(if (<= z 3e+213) (- x (* t (/ y z))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -46000000000000.0) {
tmp = x + y;
} else if (z <= 2.1e-86) {
tmp = x + (y / (a / t));
} else if (z <= 3e+213) {
tmp = x - (t * (y / 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 <= (-46000000000000.0d0)) then
tmp = x + y
else if (z <= 2.1d-86) then
tmp = x + (y / (a / t))
else if (z <= 3d+213) then
tmp = x - (t * (y / 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 <= -46000000000000.0) {
tmp = x + y;
} else if (z <= 2.1e-86) {
tmp = x + (y / (a / t));
} else if (z <= 3e+213) {
tmp = x - (t * (y / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -46000000000000.0: tmp = x + y elif z <= 2.1e-86: tmp = x + (y / (a / t)) elif z <= 3e+213: tmp = x - (t * (y / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -46000000000000.0) tmp = Float64(x + y); elseif (z <= 2.1e-86) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 3e+213) tmp = Float64(x - Float64(t * Float64(y / z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -46000000000000.0) tmp = x + y; elseif (z <= 2.1e-86) tmp = x + (y / (a / t)); elseif (z <= 3e+213) tmp = x - (t * (y / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -46000000000000.0], N[(x + y), $MachinePrecision], If[LessEqual[z, 2.1e-86], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+213], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -46000000000000:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-86}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+213}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -4.6e13 or 3.0000000000000001e213 < z Initial program 99.9%
+-commutative99.9%
associate-*r/65.4%
associate-*l/96.9%
fma-def96.8%
Simplified96.8%
Taylor expanded in z around inf 77.2%
if -4.6e13 < z < 2.1e-86Initial program 96.6%
+-commutative96.6%
associate-*r/92.8%
associate-*l/96.0%
fma-def96.0%
Simplified96.0%
Taylor expanded in z around 0 80.8%
associate-/l*85.4%
Simplified85.4%
if 2.1e-86 < z < 3.0000000000000001e213Initial program 99.8%
+-commutative99.8%
associate-*r/90.8%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 78.9%
+-commutative78.9%
*-commutative78.9%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in z around 0 78.5%
mul-1-neg78.5%
*-commutative78.5%
associate-*r/80.3%
distribute-rgt-neg-in80.3%
Simplified80.3%
Final simplification81.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1e+60) (not (<= t 3.1e-44))) (- x (* t (/ y (- z a)))) (+ x (* y (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1e+60) || !(t <= 3.1e-44)) {
tmp = x - (t * (y / (z - a)));
} else {
tmp = x + (y * (z / (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 <= (-1d+60)) .or. (.not. (t <= 3.1d-44))) then
tmp = x - (t * (y / (z - a)))
else
tmp = x + (y * (z / (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 <= -1e+60) || !(t <= 3.1e-44)) {
tmp = x - (t * (y / (z - a)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1e+60) or not (t <= 3.1e-44): tmp = x - (t * (y / (z - a))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1e+60) || !(t <= 3.1e-44)) tmp = Float64(x - Float64(t * Float64(y / Float64(z - a)))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1e+60) || ~((t <= 3.1e-44))) tmp = x - (t * (y / (z - a))); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1e+60], N[Not[LessEqual[t, 3.1e-44]], $MachinePrecision]], N[(x - N[(t * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+60} \lor \neg \left(t \leq 3.1 \cdot 10^{-44}\right):\\
\;\;\;\;x - t \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -9.9999999999999995e59 or 3.09999999999999984e-44 < t Initial program 97.7%
Taylor expanded in t around inf 78.1%
*-commutative78.1%
associate-*r/91.6%
neg-mul-191.6%
distribute-rgt-neg-in91.6%
Simplified91.6%
if -9.9999999999999995e59 < t < 3.09999999999999984e-44Initial program 99.1%
Taylor expanded in t around 0 91.5%
Final simplification91.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -100000000000.0) (+ x y) (if (<= z 1.8e-65) x (if (<= z 1.28e+26) (* t (/ (- y) z)) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -100000000000.0) {
tmp = x + y;
} else if (z <= 1.8e-65) {
tmp = x;
} else if (z <= 1.28e+26) {
tmp = t * (-y / 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 <= (-100000000000.0d0)) then
tmp = x + y
else if (z <= 1.8d-65) then
tmp = x
else if (z <= 1.28d+26) then
tmp = t * (-y / 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 <= -100000000000.0) {
tmp = x + y;
} else if (z <= 1.8e-65) {
tmp = x;
} else if (z <= 1.28e+26) {
tmp = t * (-y / z);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -100000000000.0: tmp = x + y elif z <= 1.8e-65: tmp = x elif z <= 1.28e+26: tmp = t * (-y / z) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -100000000000.0) tmp = Float64(x + y); elseif (z <= 1.8e-65) tmp = x; elseif (z <= 1.28e+26) tmp = Float64(t * Float64(Float64(-y) / z)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -100000000000.0) tmp = x + y; elseif (z <= 1.8e-65) tmp = x; elseif (z <= 1.28e+26) tmp = t * (-y / z); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -100000000000.0], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.8e-65], x, If[LessEqual[z, 1.28e+26], N[(t * N[((-y) / z), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -100000000000:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-65}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.28 \cdot 10^{+26}:\\
\;\;\;\;t \cdot \frac{-y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1e11 or 1.28e26 < z Initial program 99.9%
+-commutative99.9%
associate-*r/70.5%
associate-*l/97.6%
fma-def97.6%
Simplified97.6%
Taylor expanded in z around inf 72.6%
if -1e11 < z < 1.7999999999999999e-65Initial program 96.8%
+-commutative96.8%
associate-*r/93.1%
associate-*l/96.1%
fma-def96.1%
Simplified96.1%
Taylor expanded in y around 0 54.2%
if 1.7999999999999999e-65 < z < 1.28e26Initial program 99.8%
+-commutative99.8%
associate-*r/94.7%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 77.7%
+-commutative77.7%
*-commutative77.7%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in x around 0 70.2%
Taylor expanded in z around 0 67.6%
mul-1-neg67.6%
associate-*l/67.8%
*-commutative67.8%
distribute-rgt-neg-in67.8%
Simplified67.8%
Final simplification63.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -27000000000.0) (+ x y) (if (<= z 6.4e+22) x (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -27000000000.0) {
tmp = x + y;
} else if (z <= 6.4e+22) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-27000000000.0d0)) then
tmp = x + y
else if (z <= 6.4d+22) then
tmp = x
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -27000000000.0) {
tmp = x + y;
} else if (z <= 6.4e+22) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -27000000000.0: tmp = x + y elif z <= 6.4e+22: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -27000000000.0) tmp = Float64(x + y); elseif (z <= 6.4e+22) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -27000000000.0) tmp = x + y; elseif (z <= 6.4e+22) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -27000000000.0], N[(x + y), $MachinePrecision], If[LessEqual[z, 6.4e+22], x, N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -27000000000:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+22}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.7e10 or 6.4e22 < z Initial program 99.9%
+-commutative99.9%
associate-*r/71.3%
associate-*l/97.6%
fma-def97.6%
Simplified97.6%
Taylor expanded in z around inf 71.7%
if -2.7e10 < z < 6.4e22Initial program 97.1%
+-commutative97.1%
associate-*r/93.2%
associate-*l/96.6%
fma-def96.6%
Simplified96.6%
Taylor expanded in y around 0 49.0%
Final simplification59.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.3e+134) y x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+134) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.3d+134)) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+134) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e+134: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e+134) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.3e+134) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+134], y, x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+134}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.2999999999999998e134Initial program 100.0%
+-commutative100.0%
associate-*r/60.5%
associate-*l/97.4%
fma-def97.4%
Simplified97.4%
Taylor expanded in a around 0 60.5%
+-commutative60.5%
*-commutative60.5%
associate-/l*95.1%
Simplified95.1%
Taylor expanded in y around inf 69.6%
Taylor expanded in t around 0 54.9%
if -2.2999999999999998e134 < z Initial program 98.1%
+-commutative98.1%
associate-*r/87.0%
associate-*l/97.0%
fma-def97.0%
Simplified97.0%
Taylor expanded in y around 0 48.6%
Final simplification49.5%
(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.4%
+-commutative98.4%
associate-*r/83.1%
associate-*l/97.1%
fma-def97.1%
Simplified97.1%
Taylor expanded in y around 0 45.6%
Final simplification45.6%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (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 / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2023268
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))