
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
double code(double x, double y) {
return cosh(x) * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cosh(x) * (sin(y) / y)
end function
public static double code(double x, double y) {
return Math.cosh(x) * (Math.sin(y) / y);
}
def code(x, y): return math.cosh(x) * (math.sin(y) / y)
function code(x, y) return Float64(cosh(x) * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = cosh(x) * (sin(y) / y); end
code[x_, y_] := N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
double code(double x, double y) {
return cosh(x) * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cosh(x) * (sin(y) / y)
end function
public static double code(double x, double y) {
return Math.cosh(x) * (Math.sin(y) / y);
}
def code(x, y): return math.cosh(x) * (math.sin(y) / y)
function code(x, y) return Float64(cosh(x) * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = cosh(x) * (sin(y) / y); end
code[x_, y_] := N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
double code(double x, double y) {
return cosh(x) * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cosh(x) * (sin(y) / y)
end function
public static double code(double x, double y) {
return Math.cosh(x) * (Math.sin(y) / y);
}
def code(x, y): return math.cosh(x) * (math.sin(y) / y)
function code(x, y) return Float64(cosh(x) * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = cosh(x) * (sin(y) / y); end
code[x_, y_] := N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}
Initial program 99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (* 0.5 (* x x)))))
(if (<= x 3.5e-5)
(* (/ (sin y) y) t_0)
(if (<= x 7.2e+123)
(*
(cosh x)
(+
1.0
(*
(* y y)
(+
-0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* (* y y) -0.0001984126984126984)))))))
(* (sin y) (/ t_0 y))))))
double code(double x, double y) {
double t_0 = 1.0 + (0.5 * (x * x));
double tmp;
if (x <= 3.5e-5) {
tmp = (sin(y) / y) * t_0;
} else if (x <= 7.2e+123) {
tmp = cosh(x) * (1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984))))));
} else {
tmp = sin(y) * (t_0 / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 + (0.5d0 * (x * x))
if (x <= 3.5d-5) then
tmp = (sin(y) / y) * t_0
else if (x <= 7.2d+123) then
tmp = cosh(x) * (1.0d0 + ((y * y) * ((-0.16666666666666666d0) + ((y * y) * (0.008333333333333333d0 + ((y * y) * (-0.0001984126984126984d0)))))))
else
tmp = sin(y) * (t_0 / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (0.5 * (x * x));
double tmp;
if (x <= 3.5e-5) {
tmp = (Math.sin(y) / y) * t_0;
} else if (x <= 7.2e+123) {
tmp = Math.cosh(x) * (1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984))))));
} else {
tmp = Math.sin(y) * (t_0 / y);
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (0.5 * (x * x)) tmp = 0 if x <= 3.5e-5: tmp = (math.sin(y) / y) * t_0 elif x <= 7.2e+123: tmp = math.cosh(x) * (1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984)))))) else: tmp = math.sin(y) * (t_0 / y) return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(0.5 * Float64(x * x))) tmp = 0.0 if (x <= 3.5e-5) tmp = Float64(Float64(sin(y) / y) * t_0); elseif (x <= 7.2e+123) tmp = Float64(cosh(x) * Float64(1.0 + Float64(Float64(y * y) * Float64(-0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(Float64(y * y) * -0.0001984126984126984))))))); else tmp = Float64(sin(y) * Float64(t_0 / y)); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (0.5 * (x * x)); tmp = 0.0; if (x <= 3.5e-5) tmp = (sin(y) / y) * t_0; elseif (x <= 7.2e+123) tmp = cosh(x) * (1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984)))))); else tmp = sin(y) * (t_0 / y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 3.5e-5], N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x, 7.2e+123], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[y], $MachinePrecision] * N[(t$95$0 / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + 0.5 \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq 3.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{\sin y}{y} \cdot t\_0\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+123}:\\
\;\;\;\;\cosh x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(-0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot -0.0001984126984126984\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin y \cdot \frac{t\_0}{y}\\
\end{array}
\end{array}
if x < 3.4999999999999997e-5Initial program 99.9%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6485.4%
Simplified85.4%
if 3.4999999999999997e-5 < x < 7.19999999999999996e123Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6474.1%
Simplified74.1%
if 7.19999999999999996e123 < x Initial program 100.0%
clear-numN/A
div-invN/A
associate-/r*N/A
associate-*r/N/A
*-commutativeN/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
associate-/r/N/A
/-rgt-identityN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Final simplification85.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (* 0.5 (* x x)))))
(if (<= x 0.0155)
(* (/ (sin y) y) t_0)
(if (<= x 7.2e+123)
(* (cosh x) (+ 1.0 (* y (* y -0.16666666666666666))))
(* (sin y) (/ t_0 y))))))
double code(double x, double y) {
double t_0 = 1.0 + (0.5 * (x * x));
double tmp;
if (x <= 0.0155) {
tmp = (sin(y) / y) * t_0;
} else if (x <= 7.2e+123) {
tmp = cosh(x) * (1.0 + (y * (y * -0.16666666666666666)));
} else {
tmp = sin(y) * (t_0 / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 + (0.5d0 * (x * x))
if (x <= 0.0155d0) then
tmp = (sin(y) / y) * t_0
else if (x <= 7.2d+123) then
tmp = cosh(x) * (1.0d0 + (y * (y * (-0.16666666666666666d0))))
else
tmp = sin(y) * (t_0 / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (0.5 * (x * x));
double tmp;
if (x <= 0.0155) {
tmp = (Math.sin(y) / y) * t_0;
} else if (x <= 7.2e+123) {
tmp = Math.cosh(x) * (1.0 + (y * (y * -0.16666666666666666)));
} else {
tmp = Math.sin(y) * (t_0 / y);
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (0.5 * (x * x)) tmp = 0 if x <= 0.0155: tmp = (math.sin(y) / y) * t_0 elif x <= 7.2e+123: tmp = math.cosh(x) * (1.0 + (y * (y * -0.16666666666666666))) else: tmp = math.sin(y) * (t_0 / y) return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(0.5 * Float64(x * x))) tmp = 0.0 if (x <= 0.0155) tmp = Float64(Float64(sin(y) / y) * t_0); elseif (x <= 7.2e+123) tmp = Float64(cosh(x) * Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666)))); else tmp = Float64(sin(y) * Float64(t_0 / y)); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (0.5 * (x * x)); tmp = 0.0; if (x <= 0.0155) tmp = (sin(y) / y) * t_0; elseif (x <= 7.2e+123) tmp = cosh(x) * (1.0 + (y * (y * -0.16666666666666666))); else tmp = sin(y) * (t_0 / y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 0.0155], N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x, 7.2e+123], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[y], $MachinePrecision] * N[(t$95$0 / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + 0.5 \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq 0.0155:\\
\;\;\;\;\frac{\sin y}{y} \cdot t\_0\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+123}:\\
\;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin y \cdot \frac{t\_0}{y}\\
\end{array}
\end{array}
if x < 0.0155Initial program 99.9%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6485.4%
Simplified85.4%
if 0.0155 < x < 7.19999999999999996e123Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6474.1%
Simplified74.1%
if 7.19999999999999996e123 < x Initial program 100.0%
clear-numN/A
div-invN/A
associate-/r*N/A
associate-*r/N/A
*-commutativeN/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
associate-/r/N/A
/-rgt-identityN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Final simplification85.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (/ (sin y) y) (+ 1.0 (* 0.5 (* x x))))))
(if (<= x 0.0134)
t_0
(if (<= x 1.35e+154)
(* (cosh x) (+ 1.0 (* y (* y -0.16666666666666666))))
t_0))))
double code(double x, double y) {
double t_0 = (sin(y) / y) * (1.0 + (0.5 * (x * x)));
double tmp;
if (x <= 0.0134) {
tmp = t_0;
} else if (x <= 1.35e+154) {
tmp = cosh(x) * (1.0 + (y * (y * -0.16666666666666666)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (sin(y) / y) * (1.0d0 + (0.5d0 * (x * x)))
if (x <= 0.0134d0) then
tmp = t_0
else if (x <= 1.35d+154) then
tmp = cosh(x) * (1.0d0 + (y * (y * (-0.16666666666666666d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (Math.sin(y) / y) * (1.0 + (0.5 * (x * x)));
double tmp;
if (x <= 0.0134) {
tmp = t_0;
} else if (x <= 1.35e+154) {
tmp = Math.cosh(x) * (1.0 + (y * (y * -0.16666666666666666)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = (math.sin(y) / y) * (1.0 + (0.5 * (x * x))) tmp = 0 if x <= 0.0134: tmp = t_0 elif x <= 1.35e+154: tmp = math.cosh(x) * (1.0 + (y * (y * -0.16666666666666666))) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(Float64(sin(y) / y) * Float64(1.0 + Float64(0.5 * Float64(x * x)))) tmp = 0.0 if (x <= 0.0134) tmp = t_0; elseif (x <= 1.35e+154) tmp = Float64(cosh(x) * Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = (sin(y) / y) * (1.0 + (0.5 * (x * x))); tmp = 0.0; if (x <= 0.0134) tmp = t_0; elseif (x <= 1.35e+154) tmp = cosh(x) * (1.0 + (y * (y * -0.16666666666666666))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 0.0134], t$95$0, If[LessEqual[x, 1.35e+154], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{y} \cdot \left(1 + 0.5 \cdot \left(x \cdot x\right)\right)\\
\mathbf{if}\;x \leq 0.0134:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\cosh x \cdot \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 0.0134000000000000005 or 1.35000000000000003e154 < x Initial program 99.9%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6487.0%
Simplified87.0%
if 0.0134000000000000005 < x < 1.35000000000000003e154Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6477.4%
Simplified77.4%
Final simplification85.8%
(FPCore (x y)
:precision binary64
(if (<= x 0.00058)
(/ (sin y) y)
(if (<= x 3.3e+238)
(cosh x)
(*
(* (* x x) (* x x))
(+ 0.041666666666666664 (* (* y y) -0.006944444444444444))))))
double code(double x, double y) {
double tmp;
if (x <= 0.00058) {
tmp = sin(y) / y;
} else if (x <= 3.3e+238) {
tmp = cosh(x);
} else {
tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.00058d0) then
tmp = sin(y) / y
else if (x <= 3.3d+238) then
tmp = cosh(x)
else
tmp = ((x * x) * (x * x)) * (0.041666666666666664d0 + ((y * y) * (-0.006944444444444444d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.00058) {
tmp = Math.sin(y) / y;
} else if (x <= 3.3e+238) {
tmp = Math.cosh(x);
} else {
tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.00058: tmp = math.sin(y) / y elif x <= 3.3e+238: tmp = math.cosh(x) else: tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444)) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.00058) tmp = Float64(sin(y) / y); elseif (x <= 3.3e+238) tmp = cosh(x); else tmp = Float64(Float64(Float64(x * x) * Float64(x * x)) * Float64(0.041666666666666664 + Float64(Float64(y * y) * -0.006944444444444444))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.00058) tmp = sin(y) / y; elseif (x <= 3.3e+238) tmp = cosh(x); else tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.00058], N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 3.3e+238], N[Cosh[x], $MachinePrecision], N[(N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(y * y), $MachinePrecision] * -0.006944444444444444), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.00058:\\
\;\;\;\;\frac{\sin y}{y}\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{+238}:\\
\;\;\;\;\cosh x\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(0.041666666666666664 + \left(y \cdot y\right) \cdot -0.006944444444444444\right)\\
\end{array}
\end{array}
if x < 5.8e-4Initial program 99.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6469.0%
Simplified69.0%
if 5.8e-4 < x < 3.3000000000000001e238Initial program 100.0%
Taylor expanded in y around 0
Simplified77.8%
*-rgt-identityN/A
cosh-lowering-cosh.f6477.8%
Applied egg-rr77.8%
if 3.3000000000000001e238 < x Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.9%
Simplified90.9%
Taylor expanded in x around 0
associate-+r+N/A
*-rgt-identityN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified90.9%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-eval90.9%
Simplified90.9%
(FPCore (x y)
:precision binary64
(if (<= x 2e+242)
(cosh x)
(*
(* (* x x) (* x x))
(+ 0.041666666666666664 (* (* y y) -0.006944444444444444)))))
double code(double x, double y) {
double tmp;
if (x <= 2e+242) {
tmp = cosh(x);
} else {
tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 2d+242) then
tmp = cosh(x)
else
tmp = ((x * x) * (x * x)) * (0.041666666666666664d0 + ((y * y) * (-0.006944444444444444d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 2e+242) {
tmp = Math.cosh(x);
} else {
tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 2e+242: tmp = math.cosh(x) else: tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444)) return tmp
function code(x, y) tmp = 0.0 if (x <= 2e+242) tmp = cosh(x); else tmp = Float64(Float64(Float64(x * x) * Float64(x * x)) * Float64(0.041666666666666664 + Float64(Float64(y * y) * -0.006944444444444444))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 2e+242) tmp = cosh(x); else tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 2e+242], N[Cosh[x], $MachinePrecision], N[(N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(y * y), $MachinePrecision] * -0.006944444444444444), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{+242}:\\
\;\;\;\;\cosh x\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(0.041666666666666664 + \left(y \cdot y\right) \cdot -0.006944444444444444\right)\\
\end{array}
\end{array}
if x < 2.0000000000000001e242Initial program 99.9%
Taylor expanded in y around 0
Simplified66.1%
*-rgt-identityN/A
cosh-lowering-cosh.f6466.1%
Applied egg-rr66.1%
if 2.0000000000000001e242 < x Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.9%
Simplified90.9%
Taylor expanded in x around 0
associate-+r+N/A
*-rgt-identityN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified90.9%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-eval90.9%
Simplified90.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 0.041666666666666664 (* x (* x 0.001388888888888889))))
(t_1 (* (* x x) 0.041666666666666664))
(t_2 (* x (+ 0.5 t_1)))
(t_3 (* x t_2)))
(if (<= x 2e+48)
(/
(+ 1.0 (* t_2 (* (* (* x x) t_2) t_3)))
(+ 1.0 (* t_3 (+ (* x (* x 0.5)) -1.0))))
(if (<= x 4e+77)
(*
(+ 1.0 (* y (* y -0.16666666666666666)))
(+
1.0
(/
(* (* x x) (- 0.25 (* t_0 (* (* x t_0) (* x (* x x))))))
(- 0.5 (* (* x x) t_0)))))
(if (<= x 5.8e+241)
(* x (* x t_1))
(*
(* (* x x) (* x x))
(+ 0.041666666666666664 (* (* y y) -0.006944444444444444))))))))
double code(double x, double y) {
double t_0 = 0.041666666666666664 + (x * (x * 0.001388888888888889));
double t_1 = (x * x) * 0.041666666666666664;
double t_2 = x * (0.5 + t_1);
double t_3 = x * t_2;
double tmp;
if (x <= 2e+48) {
tmp = (1.0 + (t_2 * (((x * x) * t_2) * t_3))) / (1.0 + (t_3 * ((x * (x * 0.5)) + -1.0)));
} else if (x <= 4e+77) {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + (((x * x) * (0.25 - (t_0 * ((x * t_0) * (x * (x * x)))))) / (0.5 - ((x * x) * t_0))));
} else if (x <= 5.8e+241) {
tmp = x * (x * t_1);
} else {
tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = 0.041666666666666664d0 + (x * (x * 0.001388888888888889d0))
t_1 = (x * x) * 0.041666666666666664d0
t_2 = x * (0.5d0 + t_1)
t_3 = x * t_2
if (x <= 2d+48) then
tmp = (1.0d0 + (t_2 * (((x * x) * t_2) * t_3))) / (1.0d0 + (t_3 * ((x * (x * 0.5d0)) + (-1.0d0))))
else if (x <= 4d+77) then
tmp = (1.0d0 + (y * (y * (-0.16666666666666666d0)))) * (1.0d0 + (((x * x) * (0.25d0 - (t_0 * ((x * t_0) * (x * (x * x)))))) / (0.5d0 - ((x * x) * t_0))))
else if (x <= 5.8d+241) then
tmp = x * (x * t_1)
else
tmp = ((x * x) * (x * x)) * (0.041666666666666664d0 + ((y * y) * (-0.006944444444444444d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.041666666666666664 + (x * (x * 0.001388888888888889));
double t_1 = (x * x) * 0.041666666666666664;
double t_2 = x * (0.5 + t_1);
double t_3 = x * t_2;
double tmp;
if (x <= 2e+48) {
tmp = (1.0 + (t_2 * (((x * x) * t_2) * t_3))) / (1.0 + (t_3 * ((x * (x * 0.5)) + -1.0)));
} else if (x <= 4e+77) {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + (((x * x) * (0.25 - (t_0 * ((x * t_0) * (x * (x * x)))))) / (0.5 - ((x * x) * t_0))));
} else if (x <= 5.8e+241) {
tmp = x * (x * t_1);
} else {
tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444));
}
return tmp;
}
def code(x, y): t_0 = 0.041666666666666664 + (x * (x * 0.001388888888888889)) t_1 = (x * x) * 0.041666666666666664 t_2 = x * (0.5 + t_1) t_3 = x * t_2 tmp = 0 if x <= 2e+48: tmp = (1.0 + (t_2 * (((x * x) * t_2) * t_3))) / (1.0 + (t_3 * ((x * (x * 0.5)) + -1.0))) elif x <= 4e+77: tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + (((x * x) * (0.25 - (t_0 * ((x * t_0) * (x * (x * x)))))) / (0.5 - ((x * x) * t_0)))) elif x <= 5.8e+241: tmp = x * (x * t_1) else: tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444)) return tmp
function code(x, y) t_0 = Float64(0.041666666666666664 + Float64(x * Float64(x * 0.001388888888888889))) t_1 = Float64(Float64(x * x) * 0.041666666666666664) t_2 = Float64(x * Float64(0.5 + t_1)) t_3 = Float64(x * t_2) tmp = 0.0 if (x <= 2e+48) tmp = Float64(Float64(1.0 + Float64(t_2 * Float64(Float64(Float64(x * x) * t_2) * t_3))) / Float64(1.0 + Float64(t_3 * Float64(Float64(x * Float64(x * 0.5)) + -1.0)))); elseif (x <= 4e+77) tmp = Float64(Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(Float64(x * x) * Float64(0.25 - Float64(t_0 * Float64(Float64(x * t_0) * Float64(x * Float64(x * x)))))) / Float64(0.5 - Float64(Float64(x * x) * t_0))))); elseif (x <= 5.8e+241) tmp = Float64(x * Float64(x * t_1)); else tmp = Float64(Float64(Float64(x * x) * Float64(x * x)) * Float64(0.041666666666666664 + Float64(Float64(y * y) * -0.006944444444444444))); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.041666666666666664 + (x * (x * 0.001388888888888889)); t_1 = (x * x) * 0.041666666666666664; t_2 = x * (0.5 + t_1); t_3 = x * t_2; tmp = 0.0; if (x <= 2e+48) tmp = (1.0 + (t_2 * (((x * x) * t_2) * t_3))) / (1.0 + (t_3 * ((x * (x * 0.5)) + -1.0))); elseif (x <= 4e+77) tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + (((x * x) * (0.25 - (t_0 * ((x * t_0) * (x * (x * x)))))) / (0.5 - ((x * x) * t_0)))); elseif (x <= 5.8e+241) tmp = x * (x * t_1); else tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.041666666666666664 + N[(x * N[(x * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(0.5 + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * t$95$2), $MachinePrecision]}, If[LessEqual[x, 2e+48], N[(N[(1.0 + N[(t$95$2 * N[(N[(N[(x * x), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(t$95$3 * N[(N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4e+77], N[(N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(x * x), $MachinePrecision] * N[(0.25 - N[(t$95$0 * N[(N[(x * t$95$0), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.5 - N[(N[(x * x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e+241], N[(x * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(y * y), $MachinePrecision] * -0.006944444444444444), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\\
t_1 := \left(x \cdot x\right) \cdot 0.041666666666666664\\
t_2 := x \cdot \left(0.5 + t\_1\right)\\
t_3 := x \cdot t\_2\\
\mathbf{if}\;x \leq 2 \cdot 10^{+48}:\\
\;\;\;\;\frac{1 + t\_2 \cdot \left(\left(\left(x \cdot x\right) \cdot t\_2\right) \cdot t\_3\right)}{1 + t\_3 \cdot \left(x \cdot \left(x \cdot 0.5\right) + -1\right)}\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+77}:\\
\;\;\;\;\left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \frac{\left(x \cdot x\right) \cdot \left(0.25 - t\_0 \cdot \left(\left(x \cdot t\_0\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)}{0.5 - \left(x \cdot x\right) \cdot t\_0}\right)\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{+241}:\\
\;\;\;\;x \cdot \left(x \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(0.041666666666666664 + \left(y \cdot y\right) \cdot -0.006944444444444444\right)\\
\end{array}
\end{array}
if x < 2.00000000000000009e48Initial program 99.9%
Taylor expanded in y around 0
Simplified63.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6455.4%
Simplified55.4%
flip3-+N/A
/-lowering-/.f64N/A
Applied egg-rr40.8%
Taylor expanded in x around 0
*-lowering-*.f6444.0%
Simplified44.0%
if 2.00000000000000009e48 < x < 3.99999999999999993e77Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6480.0%
Simplified80.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.0%
Simplified80.0%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr80.0%
if 3.99999999999999993e77 < x < 5.8000000000000004e241Initial program 100.0%
Taylor expanded in y around 0
Simplified86.7%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.7%
Simplified86.7%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.7%
Simplified86.7%
if 5.8000000000000004e241 < x Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.9%
Simplified90.9%
Taylor expanded in x around 0
associate-+r+N/A
*-rgt-identityN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified90.9%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-eval90.9%
Simplified90.9%
Final simplification51.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 0.041666666666666664 (* x (* x 0.001388888888888889)))))
(if (<= x 5e+77)
(*
(+ 1.0 (* y (* y -0.16666666666666666)))
(+
1.0
(/
(* (* x x) (- 0.25 (* t_0 (* (* x t_0) (* x (* x x))))))
(- 0.5 (* (* x x) t_0)))))
(if (<= x 5e+240)
(* x (* x (* (* x x) 0.041666666666666664)))
(*
(* (* x x) (* x x))
(+ 0.041666666666666664 (* (* y y) -0.006944444444444444)))))))
double code(double x, double y) {
double t_0 = 0.041666666666666664 + (x * (x * 0.001388888888888889));
double tmp;
if (x <= 5e+77) {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + (((x * x) * (0.25 - (t_0 * ((x * t_0) * (x * (x * x)))))) / (0.5 - ((x * x) * t_0))));
} else if (x <= 5e+240) {
tmp = x * (x * ((x * x) * 0.041666666666666664));
} else {
tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 0.041666666666666664d0 + (x * (x * 0.001388888888888889d0))
if (x <= 5d+77) then
tmp = (1.0d0 + (y * (y * (-0.16666666666666666d0)))) * (1.0d0 + (((x * x) * (0.25d0 - (t_0 * ((x * t_0) * (x * (x * x)))))) / (0.5d0 - ((x * x) * t_0))))
else if (x <= 5d+240) then
tmp = x * (x * ((x * x) * 0.041666666666666664d0))
else
tmp = ((x * x) * (x * x)) * (0.041666666666666664d0 + ((y * y) * (-0.006944444444444444d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.041666666666666664 + (x * (x * 0.001388888888888889));
double tmp;
if (x <= 5e+77) {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + (((x * x) * (0.25 - (t_0 * ((x * t_0) * (x * (x * x)))))) / (0.5 - ((x * x) * t_0))));
} else if (x <= 5e+240) {
tmp = x * (x * ((x * x) * 0.041666666666666664));
} else {
tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444));
}
return tmp;
}
def code(x, y): t_0 = 0.041666666666666664 + (x * (x * 0.001388888888888889)) tmp = 0 if x <= 5e+77: tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + (((x * x) * (0.25 - (t_0 * ((x * t_0) * (x * (x * x)))))) / (0.5 - ((x * x) * t_0)))) elif x <= 5e+240: tmp = x * (x * ((x * x) * 0.041666666666666664)) else: tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444)) return tmp
function code(x, y) t_0 = Float64(0.041666666666666664 + Float64(x * Float64(x * 0.001388888888888889))) tmp = 0.0 if (x <= 5e+77) tmp = Float64(Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(Float64(x * x) * Float64(0.25 - Float64(t_0 * Float64(Float64(x * t_0) * Float64(x * Float64(x * x)))))) / Float64(0.5 - Float64(Float64(x * x) * t_0))))); elseif (x <= 5e+240) tmp = Float64(x * Float64(x * Float64(Float64(x * x) * 0.041666666666666664))); else tmp = Float64(Float64(Float64(x * x) * Float64(x * x)) * Float64(0.041666666666666664 + Float64(Float64(y * y) * -0.006944444444444444))); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.041666666666666664 + (x * (x * 0.001388888888888889)); tmp = 0.0; if (x <= 5e+77) tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + (((x * x) * (0.25 - (t_0 * ((x * t_0) * (x * (x * x)))))) / (0.5 - ((x * x) * t_0)))); elseif (x <= 5e+240) tmp = x * (x * ((x * x) * 0.041666666666666664)); else tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.041666666666666664 + N[(x * N[(x * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 5e+77], N[(N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(x * x), $MachinePrecision] * N[(0.25 - N[(t$95$0 * N[(N[(x * t$95$0), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.5 - N[(N[(x * x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e+240], N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(y * y), $MachinePrecision] * -0.006944444444444444), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\\
\mathbf{if}\;x \leq 5 \cdot 10^{+77}:\\
\;\;\;\;\left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \frac{\left(x \cdot x\right) \cdot \left(0.25 - t\_0 \cdot \left(\left(x \cdot t\_0\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)}{0.5 - \left(x \cdot x\right) \cdot t\_0}\right)\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+240}:\\
\;\;\;\;x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(0.041666666666666664 + \left(y \cdot y\right) \cdot -0.006944444444444444\right)\\
\end{array}
\end{array}
if x < 5.00000000000000004e77Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.1%
Simplified65.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6460.6%
Simplified60.6%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr45.1%
if 5.00000000000000004e77 < x < 5.0000000000000003e240Initial program 100.0%
Taylor expanded in y around 0
Simplified86.7%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.7%
Simplified86.7%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.7%
Simplified86.7%
if 5.0000000000000003e240 < x Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.9%
Simplified90.9%
Taylor expanded in x around 0
associate-+r+N/A
*-rgt-identityN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified90.9%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-eval90.9%
Simplified90.9%
Final simplification52.0%
(FPCore (x y)
:precision binary64
(let* ((t_0
(*
(+ 1.0 (* y (* y -0.16666666666666666)))
(+
1.0
(*
(* x x)
(+
0.5
(*
x
(*
x
(+ 0.041666666666666664 (* (* x x) 0.001388888888888889)))))))))
(t_1
(*
(+ 1.0 (* 0.5 (* x x)))
(+
1.0
(*
y
(*
y
(+ -0.16666666666666666 (* (* y y) 0.008333333333333333))))))))
(if (<= y 7.5e+39)
t_0
(if (<= y 2.15e+123) t_1 (if (<= y 8.5e+297) t_0 t_1)))))
double code(double x, double y) {
double t_0 = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
double t_1 = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
double tmp;
if (y <= 7.5e+39) {
tmp = t_0;
} else if (y <= 2.15e+123) {
tmp = t_1;
} else if (y <= 8.5e+297) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (1.0d0 + (y * (y * (-0.16666666666666666d0)))) * (1.0d0 + ((x * x) * (0.5d0 + (x * (x * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0)))))))
t_1 = (1.0d0 + (0.5d0 * (x * x))) * (1.0d0 + (y * (y * ((-0.16666666666666666d0) + ((y * y) * 0.008333333333333333d0)))))
if (y <= 7.5d+39) then
tmp = t_0
else if (y <= 2.15d+123) then
tmp = t_1
else if (y <= 8.5d+297) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
double t_1 = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
double tmp;
if (y <= 7.5e+39) {
tmp = t_0;
} else if (y <= 2.15e+123) {
tmp = t_1;
} else if (y <= 8.5e+297) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))) t_1 = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))) tmp = 0 if y <= 7.5e+39: tmp = t_0 elif y <= 2.15e+123: tmp = t_1 elif y <= 8.5e+297: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889)))))))) t_1 = Float64(Float64(1.0 + Float64(0.5 * Float64(x * x))) * Float64(1.0 + Float64(y * Float64(y * Float64(-0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333)))))) tmp = 0.0 if (y <= 7.5e+39) tmp = t_0; elseif (y <= 2.15e+123) tmp = t_1; elseif (y <= 8.5e+297) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))); t_1 = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))); tmp = 0.0; if (y <= 7.5e+39) tmp = t_0; elseif (y <= 2.15e+123) tmp = t_1; elseif (y <= 8.5e+297) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * N[(0.041666666666666664 + N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(y * N[(y * N[(-0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 7.5e+39], t$95$0, If[LessEqual[y, 2.15e+123], t$95$1, If[LessEqual[y, 8.5e+297], t$95$0, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
t_1 := \left(1 + 0.5 \cdot \left(x \cdot x\right)\right) \cdot \left(1 + y \cdot \left(y \cdot \left(-0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{if}\;y \leq 7.5 \cdot 10^{+39}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+297}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < 7.5000000000000005e39 or 2.14999999999999993e123 < y < 8.4999999999999994e297Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6472.3%
Simplified72.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.6%
Simplified68.6%
if 7.5000000000000005e39 < y < 2.14999999999999993e123 or 8.4999999999999994e297 < y Initial program 99.9%
clear-numN/A
div-invN/A
associate-/r*N/A
associate-*r/N/A
*-commutativeN/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.6%
Simplified67.6%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Simplified47.1%
Final simplification66.6%
(FPCore (x y)
:precision binary64
(let* ((t_0
(*
(+ 1.0 (* y (* y -0.16666666666666666)))
(+
1.0
(* (* x x) (+ 0.5 (* x (* x (* (* x x) 0.001388888888888889))))))))
(t_1
(*
(+ 1.0 (* 0.5 (* x x)))
(+
1.0
(*
y
(*
y
(+ -0.16666666666666666 (* (* y y) 0.008333333333333333))))))))
(if (<= y 7.5e+39)
t_0
(if (<= y 2.15e+123) t_1 (if (<= y 8.5e+297) t_0 t_1)))))
double code(double x, double y) {
double t_0 = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + (x * (x * ((x * x) * 0.001388888888888889))))));
double t_1 = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
double tmp;
if (y <= 7.5e+39) {
tmp = t_0;
} else if (y <= 2.15e+123) {
tmp = t_1;
} else if (y <= 8.5e+297) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (1.0d0 + (y * (y * (-0.16666666666666666d0)))) * (1.0d0 + ((x * x) * (0.5d0 + (x * (x * ((x * x) * 0.001388888888888889d0))))))
t_1 = (1.0d0 + (0.5d0 * (x * x))) * (1.0d0 + (y * (y * ((-0.16666666666666666d0) + ((y * y) * 0.008333333333333333d0)))))
if (y <= 7.5d+39) then
tmp = t_0
else if (y <= 2.15d+123) then
tmp = t_1
else if (y <= 8.5d+297) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + (x * (x * ((x * x) * 0.001388888888888889))))));
double t_1 = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
double tmp;
if (y <= 7.5e+39) {
tmp = t_0;
} else if (y <= 2.15e+123) {
tmp = t_1;
} else if (y <= 8.5e+297) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + (x * (x * ((x * x) * 0.001388888888888889)))))) t_1 = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))) tmp = 0 if y <= 7.5e+39: tmp = t_0 elif y <= 2.15e+123: tmp = t_1 elif y <= 8.5e+297: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * Float64(Float64(x * x) * 0.001388888888888889))))))) t_1 = Float64(Float64(1.0 + Float64(0.5 * Float64(x * x))) * Float64(1.0 + Float64(y * Float64(y * Float64(-0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333)))))) tmp = 0.0 if (y <= 7.5e+39) tmp = t_0; elseif (y <= 2.15e+123) tmp = t_1; elseif (y <= 8.5e+297) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + (x * (x * ((x * x) * 0.001388888888888889)))))); t_1 = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))); tmp = 0.0; if (y <= 7.5e+39) tmp = t_0; elseif (y <= 2.15e+123) tmp = t_1; elseif (y <= 8.5e+297) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(y * N[(y * N[(-0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 7.5e+39], t$95$0, If[LessEqual[y, 2.15e+123], t$95$1, If[LessEqual[y, 8.5e+297], t$95$0, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right)\\
t_1 := \left(1 + 0.5 \cdot \left(x \cdot x\right)\right) \cdot \left(1 + y \cdot \left(y \cdot \left(-0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{if}\;y \leq 7.5 \cdot 10^{+39}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+297}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < 7.5000000000000005e39 or 2.14999999999999993e123 < y < 8.4999999999999994e297Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6472.3%
Simplified72.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.6%
Simplified68.6%
Taylor expanded in x around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.3%
Simplified68.3%
if 7.5000000000000005e39 < y < 2.14999999999999993e123 or 8.4999999999999994e297 < y Initial program 99.9%
clear-numN/A
div-invN/A
associate-/r*N/A
associate-*r/N/A
*-commutativeN/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.6%
Simplified67.6%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Simplified47.1%
Final simplification66.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (* (* y y) -0.16666666666666666)))
(t_1 (+ 1.0 (* 0.5 (* x x))))
(t_2
(*
t_1
(+
1.0
(*
y
(*
y
(+ -0.16666666666666666 (* (* y y) 0.008333333333333333))))))))
(if (<= y 7.5e+39)
(* t_0 (+ 1.0 (* x (* x (+ 0.5 (* (* x x) 0.041666666666666664))))))
(if (<= y 2.15e+123)
t_2
(if (<= y 8.5e+297) (/ (/ t_1 y) (/ 1.0 (* y t_0))) t_2)))))
double code(double x, double y) {
double t_0 = 1.0 + ((y * y) * -0.16666666666666666);
double t_1 = 1.0 + (0.5 * (x * x));
double t_2 = t_1 * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
double tmp;
if (y <= 7.5e+39) {
tmp = t_0 * (1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664)))));
} else if (y <= 2.15e+123) {
tmp = t_2;
} else if (y <= 8.5e+297) {
tmp = (t_1 / y) / (1.0 / (y * t_0));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = 1.0d0 + ((y * y) * (-0.16666666666666666d0))
t_1 = 1.0d0 + (0.5d0 * (x * x))
t_2 = t_1 * (1.0d0 + (y * (y * ((-0.16666666666666666d0) + ((y * y) * 0.008333333333333333d0)))))
if (y <= 7.5d+39) then
tmp = t_0 * (1.0d0 + (x * (x * (0.5d0 + ((x * x) * 0.041666666666666664d0)))))
else if (y <= 2.15d+123) then
tmp = t_2
else if (y <= 8.5d+297) then
tmp = (t_1 / y) / (1.0d0 / (y * t_0))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + ((y * y) * -0.16666666666666666);
double t_1 = 1.0 + (0.5 * (x * x));
double t_2 = t_1 * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
double tmp;
if (y <= 7.5e+39) {
tmp = t_0 * (1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664)))));
} else if (y <= 2.15e+123) {
tmp = t_2;
} else if (y <= 8.5e+297) {
tmp = (t_1 / y) / (1.0 / (y * t_0));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y): t_0 = 1.0 + ((y * y) * -0.16666666666666666) t_1 = 1.0 + (0.5 * (x * x)) t_2 = t_1 * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))) tmp = 0 if y <= 7.5e+39: tmp = t_0 * (1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664))))) elif y <= 2.15e+123: tmp = t_2 elif y <= 8.5e+297: tmp = (t_1 / y) / (1.0 / (y * t_0)) else: tmp = t_2 return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)) t_1 = Float64(1.0 + Float64(0.5 * Float64(x * x))) t_2 = Float64(t_1 * Float64(1.0 + Float64(y * Float64(y * Float64(-0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333)))))) tmp = 0.0 if (y <= 7.5e+39) tmp = Float64(t_0 * Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * 0.041666666666666664)))))); elseif (y <= 2.15e+123) tmp = t_2; elseif (y <= 8.5e+297) tmp = Float64(Float64(t_1 / y) / Float64(1.0 / Float64(y * t_0))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + ((y * y) * -0.16666666666666666); t_1 = 1.0 + (0.5 * (x * x)); t_2 = t_1 * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))); tmp = 0.0; if (y <= 7.5e+39) tmp = t_0 * (1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664))))); elseif (y <= 2.15e+123) tmp = t_2; elseif (y <= 8.5e+297) tmp = (t_1 / y) / (1.0 / (y * t_0)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(1.0 + N[(y * N[(y * N[(-0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 7.5e+39], N[(t$95$0 * N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.15e+123], t$95$2, If[LessEqual[y, 8.5e+297], N[(N[(t$95$1 / y), $MachinePrecision] / N[(1.0 / N[(y * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \left(y \cdot y\right) \cdot -0.16666666666666666\\
t_1 := 1 + 0.5 \cdot \left(x \cdot x\right)\\
t_2 := t\_1 \cdot \left(1 + y \cdot \left(y \cdot \left(-0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{if}\;y \leq 7.5 \cdot 10^{+39}:\\
\;\;\;\;t\_0 \cdot \left(1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\right)\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{+123}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+297}:\\
\;\;\;\;\frac{\frac{t\_1}{y}}{\frac{1}{y \cdot t\_0}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < 7.5000000000000005e39Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6477.4%
Simplified77.4%
Taylor expanded in x around 0
associate-+r+N/A
*-rgt-identityN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified71.3%
if 7.5000000000000005e39 < y < 2.14999999999999993e123 or 8.4999999999999994e297 < y Initial program 99.9%
clear-numN/A
div-invN/A
associate-/r*N/A
associate-*r/N/A
*-commutativeN/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.6%
Simplified67.6%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Simplified47.1%
if 2.14999999999999993e123 < y < 8.4999999999999994e297Initial program 99.8%
clear-numN/A
div-invN/A
associate-/r*N/A
associate-*r/N/A
*-commutativeN/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.5%
Applied egg-rr99.5%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.8%
Simplified80.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6431.7%
Simplified31.7%
Final simplification65.0%
(FPCore (x y)
:precision binary64
(let* ((t_0
(*
(+ 1.0 (* 0.5 (* x x)))
(+
1.0
(*
y
(*
y
(+ -0.16666666666666666 (* (* y y) 0.008333333333333333))))))))
(if (<= y 7.5e+39)
(*
(+ 1.0 (* (* y y) -0.16666666666666666))
(+ 1.0 (* x (* x (+ 0.5 (* (* x x) 0.041666666666666664))))))
(if (<= y 2.15e+123)
t_0
(if (<= y 8.5e+297)
(+
1.0
(*
y
(*
y
(+
-0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* (* y y) -0.0001984126984126984)))))))
t_0)))))
double code(double x, double y) {
double t_0 = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
double tmp;
if (y <= 7.5e+39) {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664)))));
} else if (y <= 2.15e+123) {
tmp = t_0;
} else if (y <= 8.5e+297) {
tmp = 1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984))))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 + (0.5d0 * (x * x))) * (1.0d0 + (y * (y * ((-0.16666666666666666d0) + ((y * y) * 0.008333333333333333d0)))))
if (y <= 7.5d+39) then
tmp = (1.0d0 + ((y * y) * (-0.16666666666666666d0))) * (1.0d0 + (x * (x * (0.5d0 + ((x * x) * 0.041666666666666664d0)))))
else if (y <= 2.15d+123) then
tmp = t_0
else if (y <= 8.5d+297) then
tmp = 1.0d0 + (y * (y * ((-0.16666666666666666d0) + ((y * y) * (0.008333333333333333d0 + ((y * y) * (-0.0001984126984126984d0)))))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
double tmp;
if (y <= 7.5e+39) {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664)))));
} else if (y <= 2.15e+123) {
tmp = t_0;
} else if (y <= 8.5e+297) {
tmp = 1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984))))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))) tmp = 0 if y <= 7.5e+39: tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664))))) elif y <= 2.15e+123: tmp = t_0 elif y <= 8.5e+297: tmp = 1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984)))))) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(Float64(1.0 + Float64(0.5 * Float64(x * x))) * Float64(1.0 + Float64(y * Float64(y * Float64(-0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333)))))) tmp = 0.0 if (y <= 7.5e+39) tmp = Float64(Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)) * Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * 0.041666666666666664)))))); elseif (y <= 2.15e+123) tmp = t_0; elseif (y <= 8.5e+297) tmp = Float64(1.0 + Float64(y * Float64(y * Float64(-0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(Float64(y * y) * -0.0001984126984126984))))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))); tmp = 0.0; if (y <= 7.5e+39) tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664))))); elseif (y <= 2.15e+123) tmp = t_0; elseif (y <= 8.5e+297) tmp = 1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984)))))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(y * N[(y * N[(-0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 7.5e+39], N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.15e+123], t$95$0, If[LessEqual[y, 8.5e+297], N[(1.0 + N[(y * N[(y * N[(-0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 + 0.5 \cdot \left(x \cdot x\right)\right) \cdot \left(1 + y \cdot \left(y \cdot \left(-0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{if}\;y \leq 7.5 \cdot 10^{+39}:\\
\;\;\;\;\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\right)\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{+123}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+297}:\\
\;\;\;\;1 + y \cdot \left(y \cdot \left(-0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot -0.0001984126984126984\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < 7.5000000000000005e39Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6477.4%
Simplified77.4%
Taylor expanded in x around 0
associate-+r+N/A
*-rgt-identityN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified71.3%
if 7.5000000000000005e39 < y < 2.14999999999999993e123 or 8.4999999999999994e297 < y Initial program 99.9%
clear-numN/A
div-invN/A
associate-/r*N/A
associate-*r/N/A
*-commutativeN/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.6%
Simplified67.6%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Simplified47.1%
if 2.14999999999999993e123 < y < 8.4999999999999994e297Initial program 99.8%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6431.7%
Simplified31.7%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6431.7%
Simplified31.7%
(FPCore (x y)
:precision binary64
(if (<= y 2.15e+123)
(+
1.0
(*
x
(*
x
(+
0.5
(*
(* x x)
(+ 0.041666666666666664 (* (* x x) 0.001388888888888889)))))))
(if (<= y 8.5e+297)
(+
1.0
(*
y
(*
y
(+
-0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* (* y y) -0.0001984126984126984)))))))
(*
(+ 1.0 (* 0.5 (* x x)))
(+
1.0
(*
y
(* y (+ -0.16666666666666666 (* (* y y) 0.008333333333333333)))))))))
double code(double x, double y) {
double tmp;
if (y <= 2.15e+123) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))));
} else if (y <= 8.5e+297) {
tmp = 1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984))))));
} else {
tmp = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.15d+123) then
tmp = 1.0d0 + (x * (x * (0.5d0 + ((x * x) * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0))))))
else if (y <= 8.5d+297) then
tmp = 1.0d0 + (y * (y * ((-0.16666666666666666d0) + ((y * y) * (0.008333333333333333d0 + ((y * y) * (-0.0001984126984126984d0)))))))
else
tmp = (1.0d0 + (0.5d0 * (x * x))) * (1.0d0 + (y * (y * ((-0.16666666666666666d0) + ((y * y) * 0.008333333333333333d0)))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.15e+123) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))));
} else if (y <= 8.5e+297) {
tmp = 1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984))))));
} else {
tmp = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.15e+123: tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))) elif y <= 8.5e+297: tmp = 1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984)))))) else: tmp = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.15e+123) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889))))))); elseif (y <= 8.5e+297) tmp = Float64(1.0 + Float64(y * Float64(y * Float64(-0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(Float64(y * y) * -0.0001984126984126984))))))); else tmp = Float64(Float64(1.0 + Float64(0.5 * Float64(x * x))) * Float64(1.0 + Float64(y * Float64(y * Float64(-0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.15e+123) tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))); elseif (y <= 8.5e+297) tmp = 1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984)))))); else tmp = (1.0 + (0.5 * (x * x))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.15e+123], N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e+297], N[(1.0 + N[(y * N[(y * N[(-0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(y * N[(y * N[(-0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.15 \cdot 10^{+123}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+297}:\\
\;\;\;\;1 + y \cdot \left(y \cdot \left(-0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot -0.0001984126984126984\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + 0.5 \cdot \left(x \cdot x\right)\right) \cdot \left(1 + y \cdot \left(y \cdot \left(-0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if y < 2.14999999999999993e123Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
*-rgt-identityN/A
cosh-lowering-cosh.f6474.4%
Applied egg-rr74.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.6%
Simplified67.6%
if 2.14999999999999993e123 < y < 8.4999999999999994e297Initial program 99.8%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6431.7%
Simplified31.7%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6431.7%
Simplified31.7%
if 8.4999999999999994e297 < y Initial program 99.8%
clear-numN/A
div-invN/A
associate-/r*N/A
associate-*r/N/A
*-commutativeN/A
/-lowering-/.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in x around 0
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.6%
Simplified99.6%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Simplified38.5%
(FPCore (x y)
:precision binary64
(if (<= y 2.15e+123)
(+
1.0
(*
x
(*
x
(+
0.5
(*
(* x x)
(+ 0.041666666666666664 (* (* x x) 0.001388888888888889)))))))
(+
1.0
(*
y
(*
y
(+
-0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* (* y y) -0.0001984126984126984)))))))))
double code(double x, double y) {
double tmp;
if (y <= 2.15e+123) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))));
} else {
tmp = 1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984))))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.15d+123) then
tmp = 1.0d0 + (x * (x * (0.5d0 + ((x * x) * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0))))))
else
tmp = 1.0d0 + (y * (y * ((-0.16666666666666666d0) + ((y * y) * (0.008333333333333333d0 + ((y * y) * (-0.0001984126984126984d0)))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.15e+123) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))));
} else {
tmp = 1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984))))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.15e+123: tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))) else: tmp = 1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984)))))) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.15e+123) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889))))))); else tmp = Float64(1.0 + Float64(y * Float64(y * Float64(-0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(Float64(y * y) * -0.0001984126984126984))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.15e+123) tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))); else tmp = 1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.15e+123], N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y * N[(y * N[(-0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.15 \cdot 10^{+123}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \left(y \cdot \left(-0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot -0.0001984126984126984\right)\right)\right)\\
\end{array}
\end{array}
if y < 2.14999999999999993e123Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
*-rgt-identityN/A
cosh-lowering-cosh.f6474.4%
Applied egg-rr74.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.6%
Simplified67.6%
if 2.14999999999999993e123 < y Initial program 99.8%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6424.5%
Simplified24.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6424.5%
Simplified24.5%
(FPCore (x y)
:precision binary64
(if (<= y 2.15e+123)
(+
1.0
(*
x
(*
x
(+
0.5
(*
(* x x)
(+ 0.041666666666666664 (* (* x x) 0.001388888888888889)))))))
(* x (* x (+ 0.5 (* (* y y) -0.08333333333333333))))))
double code(double x, double y) {
double tmp;
if (y <= 2.15e+123) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))));
} else {
tmp = x * (x * (0.5 + ((y * y) * -0.08333333333333333)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.15d+123) then
tmp = 1.0d0 + (x * (x * (0.5d0 + ((x * x) * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0))))))
else
tmp = x * (x * (0.5d0 + ((y * y) * (-0.08333333333333333d0))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.15e+123) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))));
} else {
tmp = x * (x * (0.5 + ((y * y) * -0.08333333333333333)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.15e+123: tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))) else: tmp = x * (x * (0.5 + ((y * y) * -0.08333333333333333))) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.15e+123) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889))))))); else tmp = Float64(x * Float64(x * Float64(0.5 + Float64(Float64(y * y) * -0.08333333333333333)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.15e+123) tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))); else tmp = x * (x * (0.5 + ((y * y) * -0.08333333333333333))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.15e+123], N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(x * N[(0.5 + N[(N[(y * y), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.15 \cdot 10^{+123}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \left(0.5 + \left(y \cdot y\right) \cdot -0.08333333333333333\right)\right)\\
\end{array}
\end{array}
if y < 2.14999999999999993e123Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
*-rgt-identityN/A
cosh-lowering-cosh.f6474.4%
Applied egg-rr74.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.6%
Simplified67.6%
if 2.14999999999999993e123 < y Initial program 99.8%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6424.5%
Simplified24.5%
Taylor expanded in x around 0
associate-+r+N/A
*-rgt-identityN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified21.9%
Taylor expanded in x around 0
Simplified21.9%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-eval22.1%
Simplified22.1%
(FPCore (x y)
:precision binary64
(if (<= x 3.8e+69)
(+ 1.0 (* (* y y) -0.16666666666666666))
(if (<= x 9.5e+237)
(* x (* x (* (* x x) 0.041666666666666664)))
(* x (* x (+ 0.5 (* (* y y) -0.08333333333333333)))))))
double code(double x, double y) {
double tmp;
if (x <= 3.8e+69) {
tmp = 1.0 + ((y * y) * -0.16666666666666666);
} else if (x <= 9.5e+237) {
tmp = x * (x * ((x * x) * 0.041666666666666664));
} else {
tmp = x * (x * (0.5 + ((y * y) * -0.08333333333333333)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 3.8d+69) then
tmp = 1.0d0 + ((y * y) * (-0.16666666666666666d0))
else if (x <= 9.5d+237) then
tmp = x * (x * ((x * x) * 0.041666666666666664d0))
else
tmp = x * (x * (0.5d0 + ((y * y) * (-0.08333333333333333d0))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 3.8e+69) {
tmp = 1.0 + ((y * y) * -0.16666666666666666);
} else if (x <= 9.5e+237) {
tmp = x * (x * ((x * x) * 0.041666666666666664));
} else {
tmp = x * (x * (0.5 + ((y * y) * -0.08333333333333333)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 3.8e+69: tmp = 1.0 + ((y * y) * -0.16666666666666666) elif x <= 9.5e+237: tmp = x * (x * ((x * x) * 0.041666666666666664)) else: tmp = x * (x * (0.5 + ((y * y) * -0.08333333333333333))) return tmp
function code(x, y) tmp = 0.0 if (x <= 3.8e+69) tmp = Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)); elseif (x <= 9.5e+237) tmp = Float64(x * Float64(x * Float64(Float64(x * x) * 0.041666666666666664))); else tmp = Float64(x * Float64(x * Float64(0.5 + Float64(Float64(y * y) * -0.08333333333333333)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 3.8e+69) tmp = 1.0 + ((y * y) * -0.16666666666666666); elseif (x <= 9.5e+237) tmp = x * (x * ((x * x) * 0.041666666666666664)); else tmp = x * (x * (0.5 + ((y * y) * -0.08333333333333333))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 3.8e+69], N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e+237], N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(x * N[(0.5 + N[(N[(y * y), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.8 \cdot 10^{+69}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot -0.16666666666666666\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+237}:\\
\;\;\;\;x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \left(0.5 + \left(y \cdot y\right) \cdot -0.08333333333333333\right)\right)\\
\end{array}
\end{array}
if x < 3.80000000000000028e69Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.8%
Simplified64.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6443.4%
Simplified43.4%
if 3.80000000000000028e69 < x < 9.50000000000000061e237Initial program 100.0%
Taylor expanded in y around 0
Simplified84.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.5%
Simplified81.5%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.5%
Simplified81.5%
if 9.50000000000000061e237 < x Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.9%
Simplified90.9%
Taylor expanded in x around 0
associate-+r+N/A
*-rgt-identityN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified90.9%
Taylor expanded in x around 0
Simplified90.9%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-eval90.9%
Simplified90.9%
(FPCore (x y) :precision binary64 (if (<= y 2.15e+123) (+ 1.0 (* x (* x (+ 0.5 (* x (* x 0.041666666666666664)))))) (* x (* x (+ 0.5 (* (* y y) -0.08333333333333333))))))
double code(double x, double y) {
double tmp;
if (y <= 2.15e+123) {
tmp = 1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664)))));
} else {
tmp = x * (x * (0.5 + ((y * y) * -0.08333333333333333)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.15d+123) then
tmp = 1.0d0 + (x * (x * (0.5d0 + (x * (x * 0.041666666666666664d0)))))
else
tmp = x * (x * (0.5d0 + ((y * y) * (-0.08333333333333333d0))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.15e+123) {
tmp = 1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664)))));
} else {
tmp = x * (x * (0.5 + ((y * y) * -0.08333333333333333)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.15e+123: tmp = 1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664))))) else: tmp = x * (x * (0.5 + ((y * y) * -0.08333333333333333))) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.15e+123) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664)))))); else tmp = Float64(x * Float64(x * Float64(0.5 + Float64(Float64(y * y) * -0.08333333333333333)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.15e+123) tmp = 1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664))))); else tmp = x * (x * (0.5 + ((y * y) * -0.08333333333333333))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.15e+123], N[(1.0 + N[(x * N[(x * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(x * N[(0.5 + N[(N[(y * y), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.15 \cdot 10^{+123}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \left(0.5 + \left(y \cdot y\right) \cdot -0.08333333333333333\right)\right)\\
\end{array}
\end{array}
if y < 2.14999999999999993e123Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.7%
Simplified65.7%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6465.7%
Applied egg-rr65.7%
if 2.14999999999999993e123 < y Initial program 99.8%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6424.5%
Simplified24.5%
Taylor expanded in x around 0
associate-+r+N/A
*-rgt-identityN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified21.9%
Taylor expanded in x around 0
Simplified21.9%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-eval22.1%
Simplified22.1%
Final simplification59.9%
(FPCore (x y) :precision binary64 (if (<= x 6e+69) (+ 1.0 (* (* y y) -0.16666666666666666)) (* x (* x (* (* x x) 0.041666666666666664)))))
double code(double x, double y) {
double tmp;
if (x <= 6e+69) {
tmp = 1.0 + ((y * y) * -0.16666666666666666);
} else {
tmp = x * (x * ((x * x) * 0.041666666666666664));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 6d+69) then
tmp = 1.0d0 + ((y * y) * (-0.16666666666666666d0))
else
tmp = x * (x * ((x * x) * 0.041666666666666664d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 6e+69) {
tmp = 1.0 + ((y * y) * -0.16666666666666666);
} else {
tmp = x * (x * ((x * x) * 0.041666666666666664));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 6e+69: tmp = 1.0 + ((y * y) * -0.16666666666666666) else: tmp = x * (x * ((x * x) * 0.041666666666666664)) return tmp
function code(x, y) tmp = 0.0 if (x <= 6e+69) tmp = Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)); else tmp = Float64(x * Float64(x * Float64(Float64(x * x) * 0.041666666666666664))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 6e+69) tmp = 1.0 + ((y * y) * -0.16666666666666666); else tmp = x * (x * ((x * x) * 0.041666666666666664)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 6e+69], N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 6 \cdot 10^{+69}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot -0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\\
\end{array}
\end{array}
if x < 5.99999999999999967e69Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.8%
Simplified64.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6443.4%
Simplified43.4%
if 5.99999999999999967e69 < x Initial program 100.0%
Taylor expanded in y around 0
Simplified83.7%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.6%
Simplified81.6%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.6%
Simplified81.6%
(FPCore (x y) :precision binary64 (if (<= x 7.2e+123) (+ 1.0 (* (* y y) -0.16666666666666666)) (* 0.5 (* x x))))
double code(double x, double y) {
double tmp;
if (x <= 7.2e+123) {
tmp = 1.0 + ((y * y) * -0.16666666666666666);
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 7.2d+123) then
tmp = 1.0d0 + ((y * y) * (-0.16666666666666666d0))
else
tmp = 0.5d0 * (x * x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 7.2e+123) {
tmp = 1.0 + ((y * y) * -0.16666666666666666);
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 7.2e+123: tmp = 1.0 + ((y * y) * -0.16666666666666666) else: tmp = 0.5 * (x * x) return tmp
function code(x, y) tmp = 0.0 if (x <= 7.2e+123) tmp = Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)); else tmp = Float64(0.5 * Float64(x * x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 7.2e+123) tmp = 1.0 + ((y * y) * -0.16666666666666666); else tmp = 0.5 * (x * x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 7.2e+123], N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 7.2 \cdot 10^{+123}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot -0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if x < 7.19999999999999996e123Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.2%
Simplified65.2%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6441.3%
Simplified41.3%
if 7.19999999999999996e123 < x Initial program 100.0%
Taylor expanded in y around 0
Simplified86.2%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.2%
Simplified86.2%
Taylor expanded in x around 0
Simplified73.7%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.7%
Simplified73.7%
(FPCore (x y) :precision binary64 (if (<= x 8.8e+15) 1.0 (* 0.5 (* x x))))
double code(double x, double y) {
double tmp;
if (x <= 8.8e+15) {
tmp = 1.0;
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 8.8d+15) then
tmp = 1.0d0
else
tmp = 0.5d0 * (x * x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 8.8e+15) {
tmp = 1.0;
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 8.8e+15: tmp = 1.0 else: tmp = 0.5 * (x * x) return tmp
function code(x, y) tmp = 0.0 if (x <= 8.8e+15) tmp = 1.0; else tmp = Float64(0.5 * Float64(x * x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 8.8e+15) tmp = 1.0; else tmp = 0.5 * (x * x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 8.8e+15], 1.0, N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.8 \cdot 10^{+15}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if x < 8.8e15Initial program 99.9%
Taylor expanded in y around 0
Simplified63.3%
Taylor expanded in x around 0
Simplified40.2%
if 8.8e15 < x Initial program 100.0%
Taylor expanded in y around 0
Simplified79.6%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.6%
Simplified65.6%
Taylor expanded in x around 0
Simplified41.2%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6441.2%
Simplified41.2%
(FPCore (x y) :precision binary64 (+ 1.0 (* 0.5 (* x x))))
double code(double x, double y) {
return 1.0 + (0.5 * (x * x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (0.5d0 * (x * x))
end function
public static double code(double x, double y) {
return 1.0 + (0.5 * (x * x));
}
def code(x, y): return 1.0 + (0.5 * (x * x))
function code(x, y) return Float64(1.0 + Float64(0.5 * Float64(x * x))) end
function tmp = code(x, y) tmp = 1.0 + (0.5 * (x * x)); end
code[x_, y_] := N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + 0.5 \cdot \left(x \cdot x\right)
\end{array}
Initial program 99.9%
Taylor expanded in y around 0
Simplified66.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.4%
Simplified49.4%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 99.9%
Taylor expanded in y around 0
Simplified66.8%
Taylor expanded in x around 0
Simplified32.3%
(FPCore (x y) :precision binary64 (/ (* (cosh x) (sin y)) y))
double code(double x, double y) {
return (cosh(x) * sin(y)) / y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (cosh(x) * sin(y)) / y
end function
public static double code(double x, double y) {
return (Math.cosh(x) * Math.sin(y)) / y;
}
def code(x, y): return (math.cosh(x) * math.sin(y)) / y
function code(x, y) return Float64(Float64(cosh(x) * sin(y)) / y) end
function tmp = code(x, y) tmp = (cosh(x) * sin(y)) / y; end
code[x_, y_] := N[(N[(N[Cosh[x], $MachinePrecision] * N[Sin[y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cosh x \cdot \sin y}{y}
\end{array}
herbie shell --seed 2024191
(FPCore (x y)
:name "Linear.Quaternion:$csinh from linear-1.19.1.3"
:precision binary64
:alt
(! :herbie-platform default (/ (* (cosh x) (sin y)) y))
(* (cosh x) (/ (sin y) y)))