
(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 24 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
(*
(/ (sin y) y)
(+
1.0
(*
(* x x)
(+
0.5
(*
x
(*
x
(+
0.041666666666666664
(* (* x x) 0.001388888888888889))))))))))
(if (<= x 25.0) t_0 (if (<= x 7.2e+51) (cosh x) t_0))))
double code(double x, double y) {
double t_0 = (sin(y) / y) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
double tmp;
if (x <= 25.0) {
tmp = t_0;
} else if (x <= 7.2e+51) {
tmp = cosh(x);
} 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 + ((x * x) * (0.5d0 + (x * (x * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0)))))))
if (x <= 25.0d0) then
tmp = t_0
else if (x <= 7.2d+51) then
tmp = cosh(x)
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 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
double tmp;
if (x <= 25.0) {
tmp = t_0;
} else if (x <= 7.2e+51) {
tmp = Math.cosh(x);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = (math.sin(y) / y) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))) tmp = 0 if x <= 25.0: tmp = t_0 elif x <= 7.2e+51: tmp = math.cosh(x) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(Float64(sin(y) / y) * Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889)))))))) tmp = 0.0 if (x <= 25.0) tmp = t_0; elseif (x <= 7.2e+51) tmp = cosh(x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = (sin(y) / y) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))); tmp = 0.0; if (x <= 25.0) tmp = t_0; elseif (x <= 7.2e+51) tmp = cosh(x); 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[(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]}, If[LessEqual[x, 25.0], t$95$0, If[LessEqual[x, 7.2e+51], N[Cosh[x], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{y} \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)\\
\mathbf{if}\;x \leq 25:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+51}:\\
\;\;\;\;\cosh x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 25 or 7.20000000000000022e51 < x Initial program 99.9%
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
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6496.0%
Simplified96.0%
if 25 < x < 7.20000000000000022e51Initial program 100.0%
Taylor expanded in y around 0
Simplified91.7%
*-rgt-identityN/A
cosh-lowering-cosh.f6491.7%
Applied egg-rr91.7%
Final simplification95.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) y)))
(if (<= x 1.3e-6)
t_0
(if (<= x 9.8e+31)
(cosh x)
(if (<= x 1.35e+154)
(* (cosh x) (+ 1.0 (* y (* y -0.16666666666666666))))
(* t_0 (+ 1.0 (* (* x x) 0.5))))))))
double code(double x, double y) {
double t_0 = sin(y) / y;
double tmp;
if (x <= 1.3e-6) {
tmp = t_0;
} else if (x <= 9.8e+31) {
tmp = cosh(x);
} else if (x <= 1.35e+154) {
tmp = cosh(x) * (1.0 + (y * (y * -0.16666666666666666)));
} else {
tmp = t_0 * (1.0 + ((x * x) * 0.5));
}
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
if (x <= 1.3d-6) then
tmp = t_0
else if (x <= 9.8d+31) then
tmp = cosh(x)
else if (x <= 1.35d+154) then
tmp = cosh(x) * (1.0d0 + (y * (y * (-0.16666666666666666d0))))
else
tmp = t_0 * (1.0d0 + ((x * x) * 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sin(y) / y;
double tmp;
if (x <= 1.3e-6) {
tmp = t_0;
} else if (x <= 9.8e+31) {
tmp = Math.cosh(x);
} else if (x <= 1.35e+154) {
tmp = Math.cosh(x) * (1.0 + (y * (y * -0.16666666666666666)));
} else {
tmp = t_0 * (1.0 + ((x * x) * 0.5));
}
return tmp;
}
def code(x, y): t_0 = math.sin(y) / y tmp = 0 if x <= 1.3e-6: tmp = t_0 elif x <= 9.8e+31: tmp = math.cosh(x) elif x <= 1.35e+154: tmp = math.cosh(x) * (1.0 + (y * (y * -0.16666666666666666))) else: tmp = t_0 * (1.0 + ((x * x) * 0.5)) return tmp
function code(x, y) t_0 = Float64(sin(y) / y) tmp = 0.0 if (x <= 1.3e-6) tmp = t_0; elseif (x <= 9.8e+31) tmp = cosh(x); elseif (x <= 1.35e+154) tmp = Float64(cosh(x) * Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666)))); else tmp = Float64(t_0 * Float64(1.0 + Float64(Float64(x * x) * 0.5))); end return tmp end
function tmp_2 = code(x, y) t_0 = sin(y) / y; tmp = 0.0; if (x <= 1.3e-6) tmp = t_0; elseif (x <= 9.8e+31) tmp = cosh(x); elseif (x <= 1.35e+154) tmp = cosh(x) * (1.0 + (y * (y * -0.16666666666666666))); else tmp = t_0 * (1.0 + ((x * x) * 0.5)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[x, 1.3e-6], t$95$0, If[LessEqual[x, 9.8e+31], N[Cosh[x], $MachinePrecision], If[LessEqual[x, 1.35e+154], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
\mathbf{if}\;x \leq 1.3 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{+31}:\\
\;\;\;\;\cosh x\\
\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 \cdot \left(1 + \left(x \cdot x\right) \cdot 0.5\right)\\
\end{array}
\end{array}
if x < 1.30000000000000005e-6Initial program 99.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6467.7%
Simplified67.7%
if 1.30000000000000005e-6 < x < 9.79999999999999991e31Initial program 99.8%
Taylor expanded in y around 0
Simplified86.3%
*-rgt-identityN/A
cosh-lowering-cosh.f6486.3%
Applied egg-rr86.3%
if 9.79999999999999991e31 < 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-*.f6480.0%
Simplified80.0%
if 1.35000000000000003e154 < x Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/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.f64100.0%
Simplified100.0%
Final simplification72.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) y)))
(if (<= x 25.0)
(* t_0 (+ 1.0 (* (* x x) (+ 0.5 (* x (* x 0.041666666666666664))))))
(if (<= x 2.6e+77)
(cosh x)
(* t_0 (* x (* x (* (* x x) 0.041666666666666664))))))))
double code(double x, double y) {
double t_0 = sin(y) / y;
double tmp;
if (x <= 25.0) {
tmp = t_0 * (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664)))));
} else if (x <= 2.6e+77) {
tmp = cosh(x);
} else {
tmp = t_0 * (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) :: t_0
real(8) :: tmp
t_0 = sin(y) / y
if (x <= 25.0d0) then
tmp = t_0 * (1.0d0 + ((x * x) * (0.5d0 + (x * (x * 0.041666666666666664d0)))))
else if (x <= 2.6d+77) then
tmp = cosh(x)
else
tmp = t_0 * (x * (x * ((x * x) * 0.041666666666666664d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sin(y) / y;
double tmp;
if (x <= 25.0) {
tmp = t_0 * (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664)))));
} else if (x <= 2.6e+77) {
tmp = Math.cosh(x);
} else {
tmp = t_0 * (x * (x * ((x * x) * 0.041666666666666664)));
}
return tmp;
}
def code(x, y): t_0 = math.sin(y) / y tmp = 0 if x <= 25.0: tmp = t_0 * (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) elif x <= 2.6e+77: tmp = math.cosh(x) else: tmp = t_0 * (x * (x * ((x * x) * 0.041666666666666664))) return tmp
function code(x, y) t_0 = Float64(sin(y) / y) tmp = 0.0 if (x <= 25.0) tmp = Float64(t_0 * Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664)))))); elseif (x <= 2.6e+77) tmp = cosh(x); else tmp = Float64(t_0 * Float64(x * Float64(x * Float64(Float64(x * x) * 0.041666666666666664)))); end return tmp end
function tmp_2 = code(x, y) t_0 = sin(y) / y; tmp = 0.0; if (x <= 25.0) tmp = t_0 * (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))); elseif (x <= 2.6e+77) tmp = cosh(x); else tmp = t_0 * (x * (x * ((x * x) * 0.041666666666666664))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[x, 25.0], N[(t$95$0 * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.6e+77], N[Cosh[x], $MachinePrecision], N[(t$95$0 * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
\mathbf{if}\;x \leq 25:\\
\;\;\;\;t\_0 \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+77}:\\
\;\;\;\;\cosh x\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if x < 25Initial program 99.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6492.6%
Simplified92.6%
if 25 < x < 2.6000000000000002e77Initial program 100.0%
Taylor expanded in y around 0
Simplified93.8%
*-rgt-identityN/A
cosh-lowering-cosh.f6493.8%
Applied egg-rr93.8%
if 2.6000000000000002e77 < x Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification93.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) y)))
(if (<= x 1.3e-6)
t_0
(if (<= x 2.6e+77)
(cosh x)
(* t_0 (* x (* x (* (* x x) 0.041666666666666664))))))))
double code(double x, double y) {
double t_0 = sin(y) / y;
double tmp;
if (x <= 1.3e-6) {
tmp = t_0;
} else if (x <= 2.6e+77) {
tmp = cosh(x);
} else {
tmp = t_0 * (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) :: t_0
real(8) :: tmp
t_0 = sin(y) / y
if (x <= 1.3d-6) then
tmp = t_0
else if (x <= 2.6d+77) then
tmp = cosh(x)
else
tmp = t_0 * (x * (x * ((x * x) * 0.041666666666666664d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sin(y) / y;
double tmp;
if (x <= 1.3e-6) {
tmp = t_0;
} else if (x <= 2.6e+77) {
tmp = Math.cosh(x);
} else {
tmp = t_0 * (x * (x * ((x * x) * 0.041666666666666664)));
}
return tmp;
}
def code(x, y): t_0 = math.sin(y) / y tmp = 0 if x <= 1.3e-6: tmp = t_0 elif x <= 2.6e+77: tmp = math.cosh(x) else: tmp = t_0 * (x * (x * ((x * x) * 0.041666666666666664))) return tmp
function code(x, y) t_0 = Float64(sin(y) / y) tmp = 0.0 if (x <= 1.3e-6) tmp = t_0; elseif (x <= 2.6e+77) tmp = cosh(x); else tmp = Float64(t_0 * Float64(x * Float64(x * Float64(Float64(x * x) * 0.041666666666666664)))); end return tmp end
function tmp_2 = code(x, y) t_0 = sin(y) / y; tmp = 0.0; if (x <= 1.3e-6) tmp = t_0; elseif (x <= 2.6e+77) tmp = cosh(x); else tmp = t_0 * (x * (x * ((x * x) * 0.041666666666666664))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[x, 1.3e-6], t$95$0, If[LessEqual[x, 2.6e+77], N[Cosh[x], $MachinePrecision], N[(t$95$0 * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
\mathbf{if}\;x \leq 1.3 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+77}:\\
\;\;\;\;\cosh x\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if x < 1.30000000000000005e-6Initial program 99.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6467.7%
Simplified67.7%
if 1.30000000000000005e-6 < x < 2.6000000000000002e77Initial program 99.9%
Taylor expanded in y around 0
Simplified88.5%
*-rgt-identityN/A
cosh-lowering-cosh.f6488.5%
Applied egg-rr88.5%
if 2.6000000000000002e77 < x Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification74.5%
(FPCore (x y) :precision binary64 (if (<= x 1.3e-6) (/ (sin y) y) (cosh x)))
double code(double x, double y) {
double tmp;
if (x <= 1.3e-6) {
tmp = sin(y) / y;
} else {
tmp = cosh(x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.3d-6) then
tmp = sin(y) / y
else
tmp = cosh(x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.3e-6) {
tmp = Math.sin(y) / y;
} else {
tmp = Math.cosh(x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.3e-6: tmp = math.sin(y) / y else: tmp = math.cosh(x) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.3e-6) tmp = Float64(sin(y) / y); else tmp = cosh(x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.3e-6) tmp = sin(y) / y; else tmp = cosh(x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.3e-6], N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], N[Cosh[x], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.3 \cdot 10^{-6}:\\
\;\;\;\;\frac{\sin y}{y}\\
\mathbf{else}:\\
\;\;\;\;\cosh x\\
\end{array}
\end{array}
if x < 1.30000000000000005e-6Initial program 99.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6467.7%
Simplified67.7%
if 1.30000000000000005e-6 < x Initial program 100.0%
Taylor expanded in y around 0
Simplified80.1%
*-rgt-identityN/A
cosh-lowering-cosh.f6480.1%
Applied egg-rr80.1%
(FPCore (x y) :precision binary64 (cosh x))
double code(double x, double y) {
return cosh(x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cosh(x)
end function
public static double code(double x, double y) {
return Math.cosh(x);
}
def code(x, y): return math.cosh(x)
function code(x, y) return cosh(x) end
function tmp = code(x, y) tmp = cosh(x); end
code[x_, y_] := N[Cosh[x], $MachinePrecision]
\begin{array}{l}
\\
\cosh x
\end{array}
Initial program 99.9%
Taylor expanded in y around 0
Simplified64.5%
*-rgt-identityN/A
cosh-lowering-cosh.f6464.5%
Applied egg-rr64.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 0.041666666666666664 (* (* x x) 0.001388888888888889)))
(t_1 (* x t_0))
(t_2 (* x t_1)))
(if (<= x 1.05e+39)
(+
1.0
(*
(* x x)
(*
(+ 0.125 (* t_2 (* (* x x) (* t_1 t_1))))
(/ 1.0 (+ 0.25 (* t_2 (- t_2 0.5)))))))
(if (<= x 2e+134)
(*
(+ 1.0 (* y (* y -0.16666666666666666)))
(+ 1.0 (* (* x x) (+ 0.5 (* (* x x) t_0)))))
(* x (* x (* (* x x) 0.041666666666666664)))))))
double code(double x, double y) {
double t_0 = 0.041666666666666664 + ((x * x) * 0.001388888888888889);
double t_1 = x * t_0;
double t_2 = x * t_1;
double tmp;
if (x <= 1.05e+39) {
tmp = 1.0 + ((x * x) * ((0.125 + (t_2 * ((x * x) * (t_1 * t_1)))) * (1.0 / (0.25 + (t_2 * (t_2 - 0.5))))));
} else if (x <= 2e+134) {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + ((x * x) * t_0))));
} 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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = 0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0)
t_1 = x * t_0
t_2 = x * t_1
if (x <= 1.05d+39) then
tmp = 1.0d0 + ((x * x) * ((0.125d0 + (t_2 * ((x * x) * (t_1 * t_1)))) * (1.0d0 / (0.25d0 + (t_2 * (t_2 - 0.5d0))))))
else if (x <= 2d+134) then
tmp = (1.0d0 + (y * (y * (-0.16666666666666666d0)))) * (1.0d0 + ((x * x) * (0.5d0 + ((x * x) * t_0))))
else
tmp = x * (x * ((x * x) * 0.041666666666666664d0))
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 * t_0;
double t_2 = x * t_1;
double tmp;
if (x <= 1.05e+39) {
tmp = 1.0 + ((x * x) * ((0.125 + (t_2 * ((x * x) * (t_1 * t_1)))) * (1.0 / (0.25 + (t_2 * (t_2 - 0.5))))));
} else if (x <= 2e+134) {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + ((x * x) * t_0))));
} else {
tmp = x * (x * ((x * x) * 0.041666666666666664));
}
return tmp;
}
def code(x, y): t_0 = 0.041666666666666664 + ((x * x) * 0.001388888888888889) t_1 = x * t_0 t_2 = x * t_1 tmp = 0 if x <= 1.05e+39: tmp = 1.0 + ((x * x) * ((0.125 + (t_2 * ((x * x) * (t_1 * t_1)))) * (1.0 / (0.25 + (t_2 * (t_2 - 0.5)))))) elif x <= 2e+134: tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + ((x * x) * t_0)))) else: tmp = x * (x * ((x * x) * 0.041666666666666664)) return tmp
function code(x, y) t_0 = Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889)) t_1 = Float64(x * t_0) t_2 = Float64(x * t_1) tmp = 0.0 if (x <= 1.05e+39) tmp = Float64(1.0 + Float64(Float64(x * x) * Float64(Float64(0.125 + Float64(t_2 * Float64(Float64(x * x) * Float64(t_1 * t_1)))) * Float64(1.0 / Float64(0.25 + Float64(t_2 * Float64(t_2 - 0.5))))))); elseif (x <= 2e+134) tmp = Float64(Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(x * x) * t_0))))); else tmp = Float64(x * Float64(x * Float64(Float64(x * x) * 0.041666666666666664))); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.041666666666666664 + ((x * x) * 0.001388888888888889); t_1 = x * t_0; t_2 = x * t_1; tmp = 0.0; if (x <= 1.05e+39) tmp = 1.0 + ((x * x) * ((0.125 + (t_2 * ((x * x) * (t_1 * t_1)))) * (1.0 / (0.25 + (t_2 * (t_2 - 0.5)))))); elseif (x <= 2e+134) tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + ((x * x) * t_0)))); else tmp = x * (x * ((x * x) * 0.041666666666666664)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.041666666666666664 + N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(x * t$95$1), $MachinePrecision]}, If[LessEqual[x, 1.05e+39], N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(N[(0.125 + N[(t$95$2 * N[(N[(x * x), $MachinePrecision] * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(0.25 + N[(t$95$2 * N[(t$95$2 - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e+134], 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[(N[(x * x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\\
t_1 := x \cdot t\_0\\
t_2 := x \cdot t\_1\\
\mathbf{if}\;x \leq 1.05 \cdot 10^{+39}:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot \left(\left(0.125 + t\_2 \cdot \left(\left(x \cdot x\right) \cdot \left(t\_1 \cdot t\_1\right)\right)\right) \cdot \frac{1}{0.25 + t\_2 \cdot \left(t\_2 - 0.5\right)}\right)\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+134}:\\
\;\;\;\;\left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\\
\end{array}
\end{array}
if x < 1.0499999999999999e39Initial program 99.8%
Taylor expanded in y around 0
Simplified60.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6453.6%
Simplified53.6%
flip3-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr36.4%
if 1.0499999999999999e39 < x < 1.99999999999999984e134Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6483.3%
Simplified83.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6473.3%
Simplified73.3%
if 1.99999999999999984e134 < x Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in y around 0
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
cube-multN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.6%
Simplified80.6%
Final simplification44.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* x (+ 0.041666666666666664 (* (* x x) 0.001388888888888889)))))
(if (<= x 3.5e+77)
(+ 1.0 (/ (* (* x x) (- 0.25 (* (* x x) (* t_0 t_0)))) (- 0.5 (* x t_0))))
(if (<= x 5e+134)
(*
(+ 1.0 (* (* x x) (+ 0.5 (* x (* x 0.041666666666666664)))))
(+
1.0
(*
y
(*
y
(+
-0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* (* y y) -0.0001984126984126984))))))))
(* x (* x (* (* x x) 0.041666666666666664)))))))
double code(double x, double y) {
double t_0 = x * (0.041666666666666664 + ((x * x) * 0.001388888888888889));
double tmp;
if (x <= 3.5e+77) {
tmp = 1.0 + (((x * x) * (0.25 - ((x * x) * (t_0 * t_0)))) / (0.5 - (x * t_0)));
} else if (x <= 5e+134) {
tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984)))))));
} 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) :: t_0
real(8) :: tmp
t_0 = x * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0))
if (x <= 3.5d+77) then
tmp = 1.0d0 + (((x * x) * (0.25d0 - ((x * x) * (t_0 * t_0)))) / (0.5d0 - (x * t_0)))
else if (x <= 5d+134) then
tmp = (1.0d0 + ((x * x) * (0.5d0 + (x * (x * 0.041666666666666664d0))))) * (1.0d0 + (y * (y * ((-0.16666666666666666d0) + ((y * y) * (0.008333333333333333d0 + ((y * y) * (-0.0001984126984126984d0))))))))
else
tmp = x * (x * ((x * x) * 0.041666666666666664d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x * (0.041666666666666664 + ((x * x) * 0.001388888888888889));
double tmp;
if (x <= 3.5e+77) {
tmp = 1.0 + (((x * x) * (0.25 - ((x * x) * (t_0 * t_0)))) / (0.5 - (x * t_0)));
} else if (x <= 5e+134) {
tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984)))))));
} else {
tmp = x * (x * ((x * x) * 0.041666666666666664));
}
return tmp;
}
def code(x, y): t_0 = x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)) tmp = 0 if x <= 3.5e+77: tmp = 1.0 + (((x * x) * (0.25 - ((x * x) * (t_0 * t_0)))) / (0.5 - (x * t_0))) elif x <= 5e+134: tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984))))))) else: tmp = x * (x * ((x * x) * 0.041666666666666664)) return tmp
function code(x, y) t_0 = Float64(x * Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889))) tmp = 0.0 if (x <= 3.5e+77) tmp = Float64(1.0 + Float64(Float64(Float64(x * x) * Float64(0.25 - Float64(Float64(x * x) * Float64(t_0 * t_0)))) / Float64(0.5 - Float64(x * t_0)))); elseif (x <= 5e+134) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664))))) * 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(x * Float64(x * Float64(Float64(x * x) * 0.041666666666666664))); end return tmp end
function tmp_2 = code(x, y) t_0 = x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)); tmp = 0.0; if (x <= 3.5e+77) tmp = 1.0 + (((x * x) * (0.25 - ((x * x) * (t_0 * t_0)))) / (0.5 - (x * t_0))); elseif (x <= 5e+134) tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * -0.0001984126984126984))))))); else tmp = x * (x * ((x * x) * 0.041666666666666664)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x * N[(0.041666666666666664 + N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 3.5e+77], N[(1.0 + N[(N[(N[(x * x), $MachinePrecision] * N[(0.25 - N[(N[(x * x), $MachinePrecision] * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.5 - N[(x * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e+134], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $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]), $MachinePrecision], N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\\
\mathbf{if}\;x \leq 3.5 \cdot 10^{+77}:\\
\;\;\;\;1 + \frac{\left(x \cdot x\right) \cdot \left(0.25 - \left(x \cdot x\right) \cdot \left(t\_0 \cdot t\_0\right)\right)}{0.5 - x \cdot t\_0}\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+134}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right) \cdot \left(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)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\\
\end{array}
\end{array}
if x < 3.5000000000000001e77Initial program 99.9%
Taylor expanded in y around 0
Simplified62.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6454.0%
Simplified54.0%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr39.7%
if 3.5000000000000001e77 < x < 4.99999999999999981e134Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in y 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-*.f6491.7%
Simplified91.7%
if 4.99999999999999981e134 < x Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in y around 0
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
cube-multN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.6%
Simplified80.6%
Final simplification47.1%
(FPCore (x y)
:precision binary64
(if (<= x 8.5e+29)
(*
(+ 1.0 (* (* x x) (+ 0.5 (* x (* x 0.041666666666666664)))))
(+
1.0
(* y (* y (+ -0.16666666666666666 (* (* y y) 0.008333333333333333))))))
(if (<= x 5e+134)
(*
(+ 1.0 (* y (* y -0.16666666666666666)))
(+
1.0
(*
(* x x)
(+
0.5
(*
(* x x)
(+ 0.041666666666666664 (* (* x x) 0.001388888888888889)))))))
(* x (* x (* (* x x) 0.041666666666666664))))))
double code(double x, double y) {
double tmp;
if (x <= 8.5e+29) {
tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
} else if (x <= 5e+134) {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))));
} 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 <= 8.5d+29) then
tmp = (1.0d0 + ((x * x) * (0.5d0 + (x * (x * 0.041666666666666664d0))))) * (1.0d0 + (y * (y * ((-0.16666666666666666d0) + ((y * y) * 0.008333333333333333d0)))))
else if (x <= 5d+134) then
tmp = (1.0d0 + (y * (y * (-0.16666666666666666d0)))) * (1.0d0 + ((x * x) * (0.5d0 + ((x * x) * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0))))))
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 <= 8.5e+29) {
tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
} else if (x <= 5e+134) {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))));
} else {
tmp = x * (x * ((x * x) * 0.041666666666666664));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 8.5e+29: tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))) elif x <= 5e+134: tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))) else: tmp = x * (x * ((x * x) * 0.041666666666666664)) return tmp
function code(x, y) tmp = 0.0 if (x <= 8.5e+29) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664))))) * Float64(1.0 + Float64(y * Float64(y * Float64(-0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333)))))); elseif (x <= 5e+134) tmp = Float64(Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889))))))); 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 <= 8.5e+29) tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))); elseif (x <= 5e+134) tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))); else tmp = x * (x * ((x * x) * 0.041666666666666664)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 8.5e+29], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $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[x, 5e+134], 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[(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[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.5 \cdot 10^{+29}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\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{elif}\;x \leq 5 \cdot 10^{+134}:\\
\;\;\;\;\left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \left(x \cdot x\right) \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(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\\
\end{array}
\end{array}
if x < 8.5000000000000006e29Initial program 99.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.0%
Simplified90.0%
Taylor expanded in y 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
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6455.3%
Simplified55.3%
if 8.5000000000000006e29 < x < 4.99999999999999981e134Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.4%
Simplified86.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6465.2%
Simplified65.2%
if 4.99999999999999981e134 < x Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in y around 0
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
cube-multN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.6%
Simplified80.6%
Final simplification59.2%
(FPCore (x y)
:precision binary64
(if (<= x 2.25e+49)
(*
(+ 1.0 (* (* x x) (+ 0.5 (* x (* x 0.041666666666666664)))))
(+
1.0
(* y (* y (+ -0.16666666666666666 (* (* y y) 0.008333333333333333))))))
(+ 1.0 (* (* x x) (+ 0.5 (* (* x x) (* x (* x 0.001388888888888889))))))))
double code(double x, double y) {
double tmp;
if (x <= 2.25e+49) {
tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
} else {
tmp = 1.0 + ((x * x) * (0.5 + ((x * x) * (x * (x * 0.001388888888888889)))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 2.25d+49) then
tmp = (1.0d0 + ((x * x) * (0.5d0 + (x * (x * 0.041666666666666664d0))))) * (1.0d0 + (y * (y * ((-0.16666666666666666d0) + ((y * y) * 0.008333333333333333d0)))))
else
tmp = 1.0d0 + ((x * x) * (0.5d0 + ((x * x) * (x * (x * 0.001388888888888889d0)))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 2.25e+49) {
tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
} else {
tmp = 1.0 + ((x * x) * (0.5 + ((x * x) * (x * (x * 0.001388888888888889)))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 2.25e+49: tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))) else: tmp = 1.0 + ((x * x) * (0.5 + ((x * x) * (x * (x * 0.001388888888888889))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 2.25e+49) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664))))) * Float64(1.0 + Float64(y * Float64(y * Float64(-0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333)))))); else tmp = Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(x * x) * Float64(x * Float64(x * 0.001388888888888889)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 2.25e+49) tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + (y * (y * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))))); else tmp = 1.0 + ((x * x) * (0.5 + ((x * x) * (x * (x * 0.001388888888888889))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 2.25e+49], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $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], N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.25 \cdot 10^{+49}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\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{else}:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)\\
\end{array}
\end{array}
if x < 2.24999999999999991e49Initial program 99.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.9%
Simplified87.9%
Taylor expanded in y 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
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.1%
Simplified54.1%
if 2.24999999999999991e49 < x Initial program 100.0%
Taylor expanded in y around 0
Simplified79.2%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6477.3%
Simplified77.3%
Taylor expanded in x around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6477.3%
Simplified77.3%
(FPCore (x y)
:precision binary64
(if (<= y 2.7e+139)
(+
1.0
(*
x
(*
x
(+
0.5
(*
(* x x)
(+ 0.041666666666666664 (* x (* x 0.001388888888888889))))))))
(*
(+ 1.0 (* -0.16666666666666666 (* y y)))
(+ 1.0 (* x (* x (+ 0.5 (* (* x x) 0.041666666666666664))))))))
double code(double x, double y) {
double tmp;
if (y <= 2.7e+139) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889)))))));
} else {
tmp = (1.0 + (-0.16666666666666666 * (y * y))) * (1.0 + (x * (x * (0.5 + ((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 (y <= 2.7d+139) then
tmp = 1.0d0 + (x * (x * (0.5d0 + ((x * x) * (0.041666666666666664d0 + (x * (x * 0.001388888888888889d0)))))))
else
tmp = (1.0d0 + ((-0.16666666666666666d0) * (y * y))) * (1.0d0 + (x * (x * (0.5d0 + ((x * x) * 0.041666666666666664d0)))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.7e+139) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889)))))));
} else {
tmp = (1.0 + (-0.16666666666666666 * (y * y))) * (1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664)))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.7e+139: tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) else: tmp = (1.0 + (-0.16666666666666666 * (y * y))) * (1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664))))) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.7e+139) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(x * Float64(x * 0.001388888888888889)))))))); else tmp = Float64(Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y))) * Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * 0.041666666666666664)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.7e+139) tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))); else tmp = (1.0 + (-0.16666666666666666 * (y * y))) * (1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.7e+139], N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(x * N[(x * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.7 \cdot 10^{+139}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \left(1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if y < 2.6999999999999998e139Initial program 99.9%
Taylor expanded in y around 0
Simplified71.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6464.3%
Simplified64.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
+-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.3%
Simplified64.3%
if 2.6999999999999998e139 < y Initial program 99.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6493.9%
Simplified93.9%
Taylor expanded in y around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
Simplified25.2%
Final simplification59.3%
(FPCore (x y)
:precision binary64
(if (<= x 9e+30)
(+
1.0
(* (* y y) (+ -0.16666666666666666 (* (* y y) 0.008333333333333333))))
(if (<= x 1e+133)
(*
(* (* x x) (* x x))
(+ 0.041666666666666664 (* (* y y) -0.006944444444444444)))
(* x (* x (* (* x x) 0.041666666666666664))))))
double code(double x, double y) {
double tmp;
if (x <= 9e+30) {
tmp = 1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)));
} else if (x <= 1e+133) {
tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444));
} 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 <= 9d+30) then
tmp = 1.0d0 + ((y * y) * ((-0.16666666666666666d0) + ((y * y) * 0.008333333333333333d0)))
else if (x <= 1d+133) then
tmp = ((x * x) * (x * x)) * (0.041666666666666664d0 + ((y * y) * (-0.006944444444444444d0)))
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 <= 9e+30) {
tmp = 1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)));
} else if (x <= 1e+133) {
tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444));
} else {
tmp = x * (x * ((x * x) * 0.041666666666666664));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 9e+30: tmp = 1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))) elif x <= 1e+133: tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444)) else: tmp = x * (x * ((x * x) * 0.041666666666666664)) return tmp
function code(x, y) tmp = 0.0 if (x <= 9e+30) tmp = Float64(1.0 + Float64(Float64(y * y) * Float64(-0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333)))); elseif (x <= 1e+133) tmp = Float64(Float64(Float64(x * x) * Float64(x * x)) * Float64(0.041666666666666664 + Float64(Float64(y * y) * -0.006944444444444444))); 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 <= 9e+30) tmp = 1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))); elseif (x <= 1e+133) tmp = ((x * x) * (x * x)) * (0.041666666666666664 + ((y * y) * -0.006944444444444444)); else tmp = x * (x * ((x * x) * 0.041666666666666664)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 9e+30], N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e+133], N[(N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(y * y), $MachinePrecision] * -0.006944444444444444), $MachinePrecision]), $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 9 \cdot 10^{+30}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot \left(-0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\\
\mathbf{elif}\;x \leq 10^{+133}:\\
\;\;\;\;\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)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\\
\end{array}
\end{array}
if x < 8.9999999999999999e30Initial program 99.8%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Applied egg-rr99.8%
Taylor expanded in x around 0
Simplified65.4%
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
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6441.1%
Simplified41.1%
if 8.9999999999999999e30 < x < 1e133Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6457.0%
Simplified57.0%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.0%
Simplified57.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-outN/A
metadata-evalN/A
distribute-rgt-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
distribute-rgt-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
Simplified56.3%
if 1e133 < x Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in y around 0
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
cube-multN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.6%
Simplified80.6%
(FPCore (x y)
:precision binary64
(if (<= y 2.7e+139)
(+
1.0
(*
x
(*
x
(+
0.5
(*
(* x x)
(+ 0.041666666666666664 (* x (* x 0.001388888888888889))))))))
(* (+ 1.0 (* y (* y -0.16666666666666666))) (+ 1.0 (* (* x x) 0.5)))))
double code(double x, double y) {
double tmp;
if (y <= 2.7e+139) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889)))))));
} else {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * 0.5));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.7d+139) then
tmp = 1.0d0 + (x * (x * (0.5d0 + ((x * x) * (0.041666666666666664d0 + (x * (x * 0.001388888888888889d0)))))))
else
tmp = (1.0d0 + (y * (y * (-0.16666666666666666d0)))) * (1.0d0 + ((x * x) * 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.7e+139) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889)))))));
} else {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * 0.5));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.7e+139: tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) else: tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * 0.5)) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.7e+139) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(x * Float64(x * 0.001388888888888889)))))))); else tmp = Float64(Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(x * x) * 0.5))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.7e+139) tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))); else tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * 0.5)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.7e+139], N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(x * N[(x * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.7 \cdot 10^{+139}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \left(x \cdot x\right) \cdot 0.5\right)\\
\end{array}
\end{array}
if y < 2.6999999999999998e139Initial program 99.9%
Taylor expanded in y around 0
Simplified71.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6464.3%
Simplified64.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
+-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.3%
Simplified64.3%
if 2.6999999999999998e139 < 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-*.f6425.2%
Simplified25.2%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6425.2%
Simplified25.2%
Final simplification59.3%
(FPCore (x y) :precision binary64 (if (<= y 2.7e+139) (+ 1.0 (* (* x x) (+ 0.5 (* (* x x) (* x (* x 0.001388888888888889)))))) (* (+ 1.0 (* y (* y -0.16666666666666666))) (+ 1.0 (* (* x x) 0.5)))))
double code(double x, double y) {
double tmp;
if (y <= 2.7e+139) {
tmp = 1.0 + ((x * x) * (0.5 + ((x * x) * (x * (x * 0.001388888888888889)))));
} else {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * 0.5));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.7d+139) then
tmp = 1.0d0 + ((x * x) * (0.5d0 + ((x * x) * (x * (x * 0.001388888888888889d0)))))
else
tmp = (1.0d0 + (y * (y * (-0.16666666666666666d0)))) * (1.0d0 + ((x * x) * 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.7e+139) {
tmp = 1.0 + ((x * x) * (0.5 + ((x * x) * (x * (x * 0.001388888888888889)))));
} else {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * 0.5));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.7e+139: tmp = 1.0 + ((x * x) * (0.5 + ((x * x) * (x * (x * 0.001388888888888889))))) else: tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * 0.5)) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.7e+139) tmp = Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(x * x) * Float64(x * Float64(x * 0.001388888888888889)))))); else tmp = Float64(Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(x * x) * 0.5))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.7e+139) tmp = 1.0 + ((x * x) * (0.5 + ((x * x) * (x * (x * 0.001388888888888889))))); else tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * 0.5)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.7e+139], N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.7 \cdot 10^{+139}:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \left(x \cdot x\right) \cdot 0.5\right)\\
\end{array}
\end{array}
if y < 2.6999999999999998e139Initial program 99.9%
Taylor expanded in y around 0
Simplified71.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6464.3%
Simplified64.3%
Taylor expanded in x around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.2%
Simplified64.2%
if 2.6999999999999998e139 < 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-*.f6425.2%
Simplified25.2%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6425.2%
Simplified25.2%
Final simplification59.1%
(FPCore (x y) :precision binary64 (if (<= y 2.7e+139) (+ 1.0 (* x (* x (* (* x x) (* (* x x) 0.001388888888888889))))) (* (+ 1.0 (* y (* y -0.16666666666666666))) (+ 1.0 (* (* x x) 0.5)))))
double code(double x, double y) {
double tmp;
if (y <= 2.7e+139) {
tmp = 1.0 + (x * (x * ((x * x) * ((x * x) * 0.001388888888888889))));
} else {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * 0.5));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.7d+139) then
tmp = 1.0d0 + (x * (x * ((x * x) * ((x * x) * 0.001388888888888889d0))))
else
tmp = (1.0d0 + (y * (y * (-0.16666666666666666d0)))) * (1.0d0 + ((x * x) * 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.7e+139) {
tmp = 1.0 + (x * (x * ((x * x) * ((x * x) * 0.001388888888888889))));
} else {
tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * 0.5));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.7e+139: tmp = 1.0 + (x * (x * ((x * x) * ((x * x) * 0.001388888888888889)))) else: tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * 0.5)) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.7e+139) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(Float64(x * x) * Float64(Float64(x * x) * 0.001388888888888889))))); else tmp = Float64(Float64(1.0 + Float64(y * Float64(y * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(x * x) * 0.5))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.7e+139) tmp = 1.0 + (x * (x * ((x * x) * ((x * x) * 0.001388888888888889)))); else tmp = (1.0 + (y * (y * -0.16666666666666666))) * (1.0 + ((x * x) * 0.5)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.7e+139], N[(1.0 + N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(y * N[(y * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.7 \cdot 10^{+139}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + y \cdot \left(y \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \left(x \cdot x\right) \cdot 0.5\right)\\
\end{array}
\end{array}
if y < 2.6999999999999998e139Initial program 99.9%
Taylor expanded in y around 0
Simplified71.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6464.3%
Simplified64.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
+-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
distribute-lft-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.3%
Simplified64.3%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.0%
Simplified64.0%
if 2.6999999999999998e139 < 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-*.f6425.2%
Simplified25.2%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6425.2%
Simplified25.2%
Final simplification59.0%
(FPCore (x y) :precision binary64 (if (<= y 2.7e+139) (+ 1.0 (* x (* x (+ 0.5 (* (* x x) 0.041666666666666664))))) (/ 1.0 (/ y (* y (+ 1.0 (* -0.16666666666666666 (* y y))))))))
double code(double x, double y) {
double tmp;
if (y <= 2.7e+139) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664))));
} else {
tmp = 1.0 / (y / (y * (1.0 + (-0.16666666666666666 * (y * y)))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.7d+139) then
tmp = 1.0d0 + (x * (x * (0.5d0 + ((x * x) * 0.041666666666666664d0))))
else
tmp = 1.0d0 / (y / (y * (1.0d0 + ((-0.16666666666666666d0) * (y * y)))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.7e+139) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664))));
} else {
tmp = 1.0 / (y / (y * (1.0 + (-0.16666666666666666 * (y * y)))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.7e+139: tmp = 1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664)))) else: tmp = 1.0 / (y / (y * (1.0 + (-0.16666666666666666 * (y * y))))) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.7e+139) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * 0.041666666666666664))))); else tmp = Float64(1.0 / Float64(y / Float64(y * Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.7e+139) tmp = 1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664)))); else tmp = 1.0 / (y / (y * (1.0 + (-0.16666666666666666 * (y * y))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.7e+139], N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(y / N[(y * N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.7 \cdot 10^{+139}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{y \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)}}\\
\end{array}
\end{array}
if y < 2.6999999999999998e139Initial program 99.9%
Taylor expanded in y around 0
Simplified71.5%
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-*.f6461.3%
Simplified61.3%
if 2.6999999999999998e139 < y Initial program 99.8%
clear-numN/A
un-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
Simplified61.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6425.2%
Simplified25.2%
Final simplification56.6%
(FPCore (x y)
:precision binary64
(if (<= y 5.5e+108)
(+ 1.0 (* x (* x (+ 0.5 (* (* x x) 0.041666666666666664)))))
(+
1.0
(* (* y y) (+ -0.16666666666666666 (* (* y y) 0.008333333333333333))))))
double code(double x, double y) {
double tmp;
if (y <= 5.5e+108) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664))));
} else {
tmp = 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 <= 5.5d+108) then
tmp = 1.0d0 + (x * (x * (0.5d0 + ((x * x) * 0.041666666666666664d0))))
else
tmp = 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 <= 5.5e+108) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664))));
} else {
tmp = 1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.5e+108: tmp = 1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664)))) else: tmp = 1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))) return tmp
function code(x, y) tmp = 0.0 if (y <= 5.5e+108) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * 0.041666666666666664))))); else tmp = Float64(1.0 + Float64(Float64(y * 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 <= 5.5e+108) tmp = 1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664)))); else tmp = 1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.5e+108], N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.5 \cdot 10^{+108}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot \left(-0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\\
\end{array}
\end{array}
if y < 5.4999999999999998e108Initial program 99.9%
Taylor expanded in y around 0
Simplified71.3%
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-*.f6462.2%
Simplified62.2%
if 5.4999999999999998e108 < y Initial program 99.8%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Applied egg-rr99.8%
Taylor expanded in x around 0
Simplified55.9%
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
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6424.5%
Simplified24.5%
(FPCore (x y) :precision binary64 (if (<= x 1.05e+43) (+ 1.0 (* -0.16666666666666666 (* y y))) (* x (* x (* (* x x) 0.041666666666666664)))))
double code(double x, double y) {
double tmp;
if (x <= 1.05e+43) {
tmp = 1.0 + (-0.16666666666666666 * (y * y));
} 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 <= 1.05d+43) then
tmp = 1.0d0 + ((-0.16666666666666666d0) * (y * y))
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 <= 1.05e+43) {
tmp = 1.0 + (-0.16666666666666666 * (y * y));
} else {
tmp = x * (x * ((x * x) * 0.041666666666666664));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.05e+43: tmp = 1.0 + (-0.16666666666666666 * (y * y)) else: tmp = x * (x * ((x * x) * 0.041666666666666664)) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.05e+43) tmp = Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y))); 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 <= 1.05e+43) tmp = 1.0 + (-0.16666666666666666 * (y * y)); else tmp = x * (x * ((x * x) * 0.041666666666666664)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.05e+43], N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $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 1.05 \cdot 10^{+43}:\\
\;\;\;\;1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\\
\end{array}
\end{array}
if x < 1.05000000000000001e43Initial program 99.8%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.2%
Simplified59.2%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.9%
Simplified36.9%
if 1.05000000000000001e43 < x Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6488.5%
Simplified88.5%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.5%
Simplified88.5%
Taylor expanded in y around 0
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
cube-multN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.2%
Simplified68.2%
Final simplification42.9%
(FPCore (x y) :precision binary64 (+ 1.0 (* x (* x (+ 0.5 (* (* x x) 0.041666666666666664))))))
double code(double x, double y) {
return 1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (x * (x * (0.5d0 + ((x * x) * 0.041666666666666664d0))))
end function
public static double code(double x, double y) {
return 1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664))));
}
def code(x, y): return 1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664))))
function code(x, y) return Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * 0.041666666666666664))))) end
function tmp = code(x, y) tmp = 1.0 + (x * (x * (0.5 + ((x * x) * 0.041666666666666664)))); end
code[x_, y_] := N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in y around 0
Simplified64.5%
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.2%
Simplified55.2%
(FPCore (x y) :precision binary64 (if (<= x 1.46e+146) (+ 1.0 (* -0.16666666666666666 (* y y))) (* (* x x) 0.5)))
double code(double x, double y) {
double tmp;
if (x <= 1.46e+146) {
tmp = 1.0 + (-0.16666666666666666 * (y * y));
} else {
tmp = (x * x) * 0.5;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.46d+146) then
tmp = 1.0d0 + ((-0.16666666666666666d0) * (y * y))
else
tmp = (x * x) * 0.5d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.46e+146) {
tmp = 1.0 + (-0.16666666666666666 * (y * y));
} else {
tmp = (x * x) * 0.5;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.46e+146: tmp = 1.0 + (-0.16666666666666666 * (y * y)) else: tmp = (x * x) * 0.5 return tmp
function code(x, y) tmp = 0.0 if (x <= 1.46e+146) tmp = Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y))); else tmp = Float64(Float64(x * x) * 0.5); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.46e+146) tmp = 1.0 + (-0.16666666666666666 * (y * y)); else tmp = (x * x) * 0.5; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.46e+146], N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.46 \cdot 10^{+146}:\\
\;\;\;\;1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot 0.5\\
\end{array}
\end{array}
if x < 1.45999999999999993e146Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6460.9%
Simplified60.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.1%
Simplified34.1%
if 1.45999999999999993e146 < x Initial program 100.0%
Taylor expanded in y around 0
Simplified80.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6480.0%
Simplified80.0%
Taylor expanded in x around 0
Simplified74.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6474.0%
Simplified74.0%
Final simplification38.8%
(FPCore (x y) :precision binary64 (if (<= x 29.0) 1.0 (* (* x x) 0.5)))
double code(double x, double y) {
double tmp;
if (x <= 29.0) {
tmp = 1.0;
} else {
tmp = (x * x) * 0.5;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 29.0d0) then
tmp = 1.0d0
else
tmp = (x * x) * 0.5d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 29.0) {
tmp = 1.0;
} else {
tmp = (x * x) * 0.5;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 29.0: tmp = 1.0 else: tmp = (x * x) * 0.5 return tmp
function code(x, y) tmp = 0.0 if (x <= 29.0) tmp = 1.0; else tmp = Float64(Float64(x * x) * 0.5); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 29.0) tmp = 1.0; else tmp = (x * x) * 0.5; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 29.0], 1.0, N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 29:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot 0.5\\
\end{array}
\end{array}
if x < 29Initial program 99.8%
Taylor expanded in y around 0
Simplified59.4%
Taylor expanded in x around 0
Simplified35.5%
if 29 < x Initial program 100.0%
Taylor expanded in y around 0
Simplified81.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6463.7%
Simplified63.7%
Taylor expanded in x around 0
Simplified39.5%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.5%
Simplified39.5%
Final simplification36.4%
(FPCore (x y) :precision binary64 (+ 1.0 (* (* x x) 0.5)))
double code(double x, double y) {
return 1.0 + ((x * x) * 0.5);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((x * x) * 0.5d0)
end function
public static double code(double x, double y) {
return 1.0 + ((x * x) * 0.5);
}
def code(x, y): return 1.0 + ((x * x) * 0.5)
function code(x, y) return Float64(1.0 + Float64(Float64(x * x) * 0.5)) end
function tmp = code(x, y) tmp = 1.0 + ((x * x) * 0.5); end
code[x_, y_] := N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \left(x \cdot x\right) \cdot 0.5
\end{array}
Initial program 99.9%
Taylor expanded in y around 0
Simplified64.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.9%
Simplified45.9%
Final simplification45.9%
(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
Simplified64.5%
Taylor expanded in x around 0
Simplified27.9%
(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 2024158
(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)))