
(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 21 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(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}
Initial program 99.9%
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f6499.9%
Applied egg-rr99.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(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 (* x (* x x)))
(t_1
(*
(/ (sin y) y)
(+ 1.0 (* (* x x) (+ 0.5 (* x (* x 0.041666666666666664)))))))
(t_2 (* (* x x) 0.001388888888888889)))
(if (<= x 0.125)
t_1
(if (<= x 5.5e+41)
(/ (* (cosh x) y) y)
(if (<= x 2.6e+77)
(*
(+
1.0
(*
(* x x)
(+
0.5
(/
(*
(* x x)
(+ 7.233796296296296e-5 (* t_0 (* t_0 2.6791838134430728e-9))))
(+ 0.001736111111111111 (* t_2 (- t_2 0.041666666666666664)))))))
(+ 1.0 (* (* y y) -0.16666666666666666)))
t_1)))))
double code(double x, double y) {
double t_0 = x * (x * x);
double t_1 = (sin(y) / y) * (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664)))));
double t_2 = (x * x) * 0.001388888888888889;
double tmp;
if (x <= 0.125) {
tmp = t_1;
} else if (x <= 5.5e+41) {
tmp = (cosh(x) * y) / y;
} else if (x <= 2.6e+77) {
tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_2 * (t_2 - 0.041666666666666664))))))) * (1.0 + ((y * y) * -0.16666666666666666));
} 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) :: t_2
real(8) :: tmp
t_0 = x * (x * x)
t_1 = (sin(y) / y) * (1.0d0 + ((x * x) * (0.5d0 + (x * (x * 0.041666666666666664d0)))))
t_2 = (x * x) * 0.001388888888888889d0
if (x <= 0.125d0) then
tmp = t_1
else if (x <= 5.5d+41) then
tmp = (cosh(x) * y) / y
else if (x <= 2.6d+77) then
tmp = (1.0d0 + ((x * x) * (0.5d0 + (((x * x) * (7.233796296296296d-5 + (t_0 * (t_0 * 2.6791838134430728d-9)))) / (0.001736111111111111d0 + (t_2 * (t_2 - 0.041666666666666664d0))))))) * (1.0d0 + ((y * y) * (-0.16666666666666666d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x * (x * x);
double t_1 = (Math.sin(y) / y) * (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664)))));
double t_2 = (x * x) * 0.001388888888888889;
double tmp;
if (x <= 0.125) {
tmp = t_1;
} else if (x <= 5.5e+41) {
tmp = (Math.cosh(x) * y) / y;
} else if (x <= 2.6e+77) {
tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_2 * (t_2 - 0.041666666666666664))))))) * (1.0 + ((y * y) * -0.16666666666666666));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = x * (x * x) t_1 = (math.sin(y) / y) * (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) t_2 = (x * x) * 0.001388888888888889 tmp = 0 if x <= 0.125: tmp = t_1 elif x <= 5.5e+41: tmp = (math.cosh(x) * y) / y elif x <= 2.6e+77: tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_2 * (t_2 - 0.041666666666666664))))))) * (1.0 + ((y * y) * -0.16666666666666666)) else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(x * Float64(x * x)) t_1 = Float64(Float64(sin(y) / y) * Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664)))))) t_2 = Float64(Float64(x * x) * 0.001388888888888889) tmp = 0.0 if (x <= 0.125) tmp = t_1; elseif (x <= 5.5e+41) tmp = Float64(Float64(cosh(x) * y) / y); elseif (x <= 2.6e+77) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(Float64(x * x) * Float64(7.233796296296296e-5 + Float64(t_0 * Float64(t_0 * 2.6791838134430728e-9)))) / Float64(0.001736111111111111 + Float64(t_2 * Float64(t_2 - 0.041666666666666664))))))) * Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = x * (x * x); t_1 = (sin(y) / y) * (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))); t_2 = (x * x) * 0.001388888888888889; tmp = 0.0; if (x <= 0.125) tmp = t_1; elseif (x <= 5.5e+41) tmp = (cosh(x) * y) / y; elseif (x <= 2.6e+77) tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_2 * (t_2 - 0.041666666666666664))))))) * (1.0 + ((y * y) * -0.16666666666666666)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]}, If[LessEqual[x, 0.125], t$95$1, If[LessEqual[x, 5.5e+41], N[(N[(N[Cosh[x], $MachinePrecision] * y), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 2.6e+77], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(N[(x * x), $MachinePrecision] * N[(7.233796296296296e-5 + N[(t$95$0 * N[(t$95$0 * 2.6791838134430728e-9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.001736111111111111 + N[(t$95$2 * N[(t$95$2 - 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
t_1 := \frac{\sin y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\\
t_2 := \left(x \cdot x\right) \cdot 0.001388888888888889\\
\mathbf{if}\;x \leq 0.125:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{+41}:\\
\;\;\;\;\frac{\cosh x \cdot y}{y}\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+77}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \frac{\left(x \cdot x\right) \cdot \left(7.233796296296296 \cdot 10^{-5} + t\_0 \cdot \left(t\_0 \cdot 2.6791838134430728 \cdot 10^{-9}\right)\right)}{0.001736111111111111 + t\_2 \cdot \left(t\_2 - 0.041666666666666664\right)}\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < 0.125 or 2.6000000000000002e77 < 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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6491.8%
Simplified91.8%
if 0.125 < x < 5.5000000000000003e41Initial program 99.8%
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0
Simplified100.0%
if 5.5000000000000003e41 < x < 2.6000000000000002e77Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.0%
Simplified75.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-*.f6429.0%
Simplified29.0%
associate-*r*N/A
flip3-+N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr75.0%
Final simplification91.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (/ (sin y) y) (+ 1.0 (* (* x x) 0.5)))))
(if (<= x 0.04)
t_0
(if (<= x 3.3e+41)
(/ (* (cosh x) y) y)
(if (<= x 1.32e+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 + ((x * x) * 0.5));
double tmp;
if (x <= 0.04) {
tmp = t_0;
} else if (x <= 3.3e+41) {
tmp = (cosh(x) * y) / y;
} else if (x <= 1.32e+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 + ((x * x) * 0.5d0))
if (x <= 0.04d0) then
tmp = t_0
else if (x <= 3.3d+41) then
tmp = (cosh(x) * y) / y
else if (x <= 1.32d+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 + ((x * x) * 0.5));
double tmp;
if (x <= 0.04) {
tmp = t_0;
} else if (x <= 3.3e+41) {
tmp = (Math.cosh(x) * y) / y;
} else if (x <= 1.32e+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 + ((x * x) * 0.5)) tmp = 0 if x <= 0.04: tmp = t_0 elif x <= 3.3e+41: tmp = (math.cosh(x) * y) / y elif x <= 1.32e+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(Float64(x * x) * 0.5))) tmp = 0.0 if (x <= 0.04) tmp = t_0; elseif (x <= 3.3e+41) tmp = Float64(Float64(cosh(x) * y) / y); elseif (x <= 1.32e+154) tmp = Float64(cosh(x) * Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666))); 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)); tmp = 0.0; if (x <= 0.04) tmp = t_0; elseif (x <= 3.3e+41) tmp = (cosh(x) * y) / y; elseif (x <= 1.32e+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[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 0.04], t$95$0, If[LessEqual[x, 3.3e+41], N[(N[(N[Cosh[x], $MachinePrecision] * y), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 1.32e+154], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $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 0.5\right)\\
\mathbf{if}\;x \leq 0.04:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{+41}:\\
\;\;\;\;\frac{\cosh x \cdot y}{y}\\
\mathbf{elif}\;x \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;\cosh x \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 0.0400000000000000008 or 1.31999999999999998e154 < 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.f6483.8%
Simplified83.8%
if 0.0400000000000000008 < x < 3.3e41Initial program 99.8%
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0
Simplified100.0%
if 3.3e41 < x < 1.31999999999999998e154Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.7%
Simplified91.7%
Final simplification85.0%
(FPCore (x y)
:precision binary64
(if (<= x 0.015)
(/ (sin y) y)
(if (<= x 4e+41)
(/ (* (cosh x) y) y)
(* (cosh x) (+ 1.0 (* (* y y) -0.16666666666666666))))))
double code(double x, double y) {
double tmp;
if (x <= 0.015) {
tmp = sin(y) / y;
} else if (x <= 4e+41) {
tmp = (cosh(x) * y) / y;
} else {
tmp = cosh(x) * (1.0 + ((y * y) * -0.16666666666666666));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.015d0) then
tmp = sin(y) / y
else if (x <= 4d+41) then
tmp = (cosh(x) * y) / y
else
tmp = cosh(x) * (1.0d0 + ((y * y) * (-0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.015) {
tmp = Math.sin(y) / y;
} else if (x <= 4e+41) {
tmp = (Math.cosh(x) * y) / y;
} else {
tmp = Math.cosh(x) * (1.0 + ((y * y) * -0.16666666666666666));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.015: tmp = math.sin(y) / y elif x <= 4e+41: tmp = (math.cosh(x) * y) / y else: tmp = math.cosh(x) * (1.0 + ((y * y) * -0.16666666666666666)) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.015) tmp = Float64(sin(y) / y); elseif (x <= 4e+41) tmp = Float64(Float64(cosh(x) * y) / y); else tmp = Float64(cosh(x) * Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.015) tmp = sin(y) / y; elseif (x <= 4e+41) tmp = (cosh(x) * y) / y; else tmp = cosh(x) * (1.0 + ((y * y) * -0.16666666666666666)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.015], N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 4e+41], N[(N[(N[Cosh[x], $MachinePrecision] * y), $MachinePrecision] / y), $MachinePrecision], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.015:\\
\;\;\;\;\frac{\sin y}{y}\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+41}:\\
\;\;\;\;\frac{\cosh x \cdot y}{y}\\
\mathbf{else}:\\
\;\;\;\;\cosh x \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if x < 0.014999999999999999Initial program 99.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6459.2%
Simplified59.2%
if 0.014999999999999999 < x < 4.00000000000000002e41Initial program 99.8%
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0
Simplified100.0%
if 4.00000000000000002e41 < x Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.8%
Simplified86.8%
(FPCore (x y)
:precision binary64
(if (<= x 0.0095)
(/ (sin y) y)
(if (<= x 7.2e+51)
(/ (* (cosh x) y) y)
(*
(+ 1.0 (* (* y y) -0.16666666666666666))
(+
1.0
(*
(* x x)
(+
0.5
(*
x
(*
x
(+ 0.041666666666666664 (* (* x x) 0.001388888888888889)))))))))))
double code(double x, double y) {
double tmp;
if (x <= 0.0095) {
tmp = sin(y) / y;
} else if (x <= 7.2e+51) {
tmp = (cosh(x) * y) / y;
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((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 <= 0.0095d0) then
tmp = sin(y) / y
else if (x <= 7.2d+51) then
tmp = (cosh(x) * y) / y
else
tmp = (1.0d0 + ((y * y) * (-0.16666666666666666d0))) * (1.0d0 + ((x * x) * (0.5d0 + (x * (x * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0)))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.0095) {
tmp = Math.sin(y) / y;
} else if (x <= 7.2e+51) {
tmp = (Math.cosh(x) * y) / y;
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.0095: tmp = math.sin(y) / y elif x <= 7.2e+51: tmp = (math.cosh(x) * y) / y else: tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.0095) tmp = Float64(sin(y) / y); elseif (x <= 7.2e+51) tmp = Float64(Float64(cosh(x) * y) / y); else tmp = Float64(Float64(1.0 + Float64(Float64(y * 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)))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.0095) tmp = sin(y) / y; elseif (x <= 7.2e+51) tmp = (cosh(x) * y) / y; else tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.0095], N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 7.2e+51], N[(N[(N[Cosh[x], $MachinePrecision] * y), $MachinePrecision] / y), $MachinePrecision], N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0095:\\
\;\;\;\;\frac{\sin y}{y}\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+51}:\\
\;\;\;\;\frac{\cosh x \cdot y}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\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)\\
\end{array}
\end{array}
if x < 0.00949999999999999976Initial program 99.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6459.2%
Simplified59.2%
if 0.00949999999999999976 < x < 7.20000000000000022e51Initial program 99.9%
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f64100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0
Simplified90.9%
if 7.20000000000000022e51 < x Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6485.7%
Simplified85.7%
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-*.f6485.7%
Simplified85.7%
Final simplification65.6%
(FPCore (x y)
:precision binary64
(if (<= x 0.005)
(/ (sin y) y)
(if (<= x 8e+51)
(cosh x)
(*
(+ 1.0 (* (* y y) -0.16666666666666666))
(+
1.0
(*
(* x x)
(+
0.5
(*
x
(*
x
(+ 0.041666666666666664 (* (* x x) 0.001388888888888889)))))))))))
double code(double x, double y) {
double tmp;
if (x <= 0.005) {
tmp = sin(y) / y;
} else if (x <= 8e+51) {
tmp = cosh(x);
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((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 <= 0.005d0) then
tmp = sin(y) / y
else if (x <= 8d+51) then
tmp = cosh(x)
else
tmp = (1.0d0 + ((y * y) * (-0.16666666666666666d0))) * (1.0d0 + ((x * x) * (0.5d0 + (x * (x * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0)))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.005) {
tmp = Math.sin(y) / y;
} else if (x <= 8e+51) {
tmp = Math.cosh(x);
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.005: tmp = math.sin(y) / y elif x <= 8e+51: tmp = math.cosh(x) else: tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.005) tmp = Float64(sin(y) / y); elseif (x <= 8e+51) tmp = cosh(x); else tmp = Float64(Float64(1.0 + Float64(Float64(y * 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)))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.005) tmp = sin(y) / y; elseif (x <= 8e+51) tmp = cosh(x); else tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.005], N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 8e+51], N[Cosh[x], $MachinePrecision], N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.005:\\
\;\;\;\;\frac{\sin y}{y}\\
\mathbf{elif}\;x \leq 8 \cdot 10^{+51}:\\
\;\;\;\;\cosh x\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\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)\\
\end{array}
\end{array}
if x < 0.0050000000000000001Initial program 99.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6459.2%
Simplified59.2%
if 0.0050000000000000001 < x < 8e51Initial program 99.9%
Taylor expanded in y around 0
Simplified90.8%
*-rgt-identityN/A
cosh-lowering-cosh.f6490.8%
Applied egg-rr90.8%
if 8e51 < x Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6485.7%
Simplified85.7%
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-*.f6485.7%
Simplified85.7%
Final simplification65.6%
(FPCore (x y)
:precision binary64
(if (<= x 7.2e+51)
(cosh x)
(*
(+ 1.0 (* (* y y) -0.16666666666666666))
(+
1.0
(*
(* x x)
(+
0.5
(*
x
(* x (+ 0.041666666666666664 (* (* x x) 0.001388888888888889))))))))))
double code(double x, double y) {
double tmp;
if (x <= 7.2e+51) {
tmp = cosh(x);
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((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 <= 7.2d+51) then
tmp = cosh(x)
else
tmp = (1.0d0 + ((y * y) * (-0.16666666666666666d0))) * (1.0d0 + ((x * x) * (0.5d0 + (x * (x * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0)))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 7.2e+51) {
tmp = Math.cosh(x);
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 7.2e+51: tmp = math.cosh(x) else: tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 7.2e+51) tmp = cosh(x); else tmp = Float64(Float64(1.0 + Float64(Float64(y * 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)))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 7.2e+51) tmp = cosh(x); else tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 7.2e+51], N[Cosh[x], $MachinePrecision], N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 7.2 \cdot 10^{+51}:\\
\;\;\;\;\cosh x\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\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)\\
\end{array}
\end{array}
if x < 7.20000000000000022e51Initial program 99.9%
Taylor expanded in y around 0
Simplified59.1%
*-rgt-identityN/A
cosh-lowering-cosh.f6459.1%
Applied egg-rr59.1%
if 7.20000000000000022e51 < x Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6485.7%
Simplified85.7%
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-*.f6485.7%
Simplified85.7%
Final simplification64.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* x (* x x)))
(t_1 (* (* x x) 0.001388888888888889))
(t_2 (+ 1.0 (* (* y y) -0.16666666666666666))))
(if (<= x 1.12e+77)
(*
(+
1.0
(*
(* x x)
(+
0.5
(/
(*
(* x x)
(+ 7.233796296296296e-5 (* t_0 (* t_0 2.6791838134430728e-9))))
(+ 0.001736111111111111 (* t_1 (- t_1 0.041666666666666664)))))))
t_2)
(* (+ 1.0 (* (* x x) (+ 0.5 (* x (* x 0.041666666666666664))))) t_2))))
double code(double x, double y) {
double t_0 = x * (x * x);
double t_1 = (x * x) * 0.001388888888888889;
double t_2 = 1.0 + ((y * y) * -0.16666666666666666);
double tmp;
if (x <= 1.12e+77) {
tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_1 * (t_1 - 0.041666666666666664))))))) * t_2;
} else {
tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * 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 = x * (x * x)
t_1 = (x * x) * 0.001388888888888889d0
t_2 = 1.0d0 + ((y * y) * (-0.16666666666666666d0))
if (x <= 1.12d+77) then
tmp = (1.0d0 + ((x * x) * (0.5d0 + (((x * x) * (7.233796296296296d-5 + (t_0 * (t_0 * 2.6791838134430728d-9)))) / (0.001736111111111111d0 + (t_1 * (t_1 - 0.041666666666666664d0))))))) * t_2
else
tmp = (1.0d0 + ((x * x) * (0.5d0 + (x * (x * 0.041666666666666664d0))))) * t_2
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x * (x * x);
double t_1 = (x * x) * 0.001388888888888889;
double t_2 = 1.0 + ((y * y) * -0.16666666666666666);
double tmp;
if (x <= 1.12e+77) {
tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_1 * (t_1 - 0.041666666666666664))))))) * t_2;
} else {
tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * t_2;
}
return tmp;
}
def code(x, y): t_0 = x * (x * x) t_1 = (x * x) * 0.001388888888888889 t_2 = 1.0 + ((y * y) * -0.16666666666666666) tmp = 0 if x <= 1.12e+77: tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_1 * (t_1 - 0.041666666666666664))))))) * t_2 else: tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * t_2 return tmp
function code(x, y) t_0 = Float64(x * Float64(x * x)) t_1 = Float64(Float64(x * x) * 0.001388888888888889) t_2 = Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)) tmp = 0.0 if (x <= 1.12e+77) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(Float64(x * x) * Float64(7.233796296296296e-5 + Float64(t_0 * Float64(t_0 * 2.6791838134430728e-9)))) / Float64(0.001736111111111111 + Float64(t_1 * Float64(t_1 - 0.041666666666666664))))))) * t_2); else tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664))))) * t_2); end return tmp end
function tmp_2 = code(x, y) t_0 = x * (x * x); t_1 = (x * x) * 0.001388888888888889; t_2 = 1.0 + ((y * y) * -0.16666666666666666); tmp = 0.0; if (x <= 1.12e+77) tmp = (1.0 + ((x * x) * (0.5 + (((x * x) * (7.233796296296296e-5 + (t_0 * (t_0 * 2.6791838134430728e-9)))) / (0.001736111111111111 + (t_1 * (t_1 - 0.041666666666666664))))))) * t_2; else tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * t_2; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.12e+77], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(N[(x * x), $MachinePrecision] * N[(7.233796296296296e-5 + N[(t$95$0 * N[(t$95$0 * 2.6791838134430728e-9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.001736111111111111 + N[(t$95$1 * N[(t$95$1 - 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
t_1 := \left(x \cdot x\right) \cdot 0.001388888888888889\\
t_2 := 1 + \left(y \cdot y\right) \cdot -0.16666666666666666\\
\mathbf{if}\;x \leq 1.12 \cdot 10^{+77}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \frac{\left(x \cdot x\right) \cdot \left(7.233796296296296 \cdot 10^{-5} + t\_0 \cdot \left(t\_0 \cdot 2.6791838134430728 \cdot 10^{-9}\right)\right)}{0.001736111111111111 + t\_1 \cdot \left(t\_1 - 0.041666666666666664\right)}\right)\right) \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right) \cdot t\_2\\
\end{array}
\end{array}
if x < 1.1199999999999999e77Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.2%
Simplified58.2%
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-*.f6452.5%
Simplified52.5%
associate-*r*N/A
flip3-+N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr34.2%
if 1.1199999999999999e77 < 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-*.f6497.9%
Simplified97.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
*-lowering-*.f64N/A
Simplified89.1%
Final simplification44.1%
(FPCore (x y)
:precision binary64
(*
(+ 1.0 (* (* y y) -0.16666666666666666))
(+
(+ 1.0 (* x (* x 0.5)))
(*
(* x x)
(* (* x x) (+ 0.041666666666666664 (* (* x x) 0.001388888888888889)))))))
double code(double x, double y) {
return (1.0 + ((y * y) * -0.16666666666666666)) * ((1.0 + (x * (x * 0.5))) + ((x * x) * ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 + ((y * y) * (-0.16666666666666666d0))) * ((1.0d0 + (x * (x * 0.5d0))) + ((x * x) * ((x * x) * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0)))))
end function
public static double code(double x, double y) {
return (1.0 + ((y * y) * -0.16666666666666666)) * ((1.0 + (x * (x * 0.5))) + ((x * x) * ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))));
}
def code(x, y): return (1.0 + ((y * y) * -0.16666666666666666)) * ((1.0 + (x * (x * 0.5))) + ((x * x) * ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))
function code(x, y) return Float64(Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)) * Float64(Float64(1.0 + Float64(x * Float64(x * 0.5))) + Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(Float64(x * x) * 0.001388888888888889)))))) end
function tmp = code(x, y) tmp = (1.0 + ((y * y) * -0.16666666666666666)) * ((1.0 + (x * (x * 0.5))) + ((x * x) * ((x * x) * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))); end
code[x_, y_] := N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(\left(1 + x \cdot \left(x \cdot 0.5\right)\right) + \left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6463.8%
Simplified63.8%
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-*.f6459.1%
Simplified59.1%
distribute-rgt-inN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.1%
Applied egg-rr59.1%
Final simplification59.1%
(FPCore (x y)
:precision binary64
(*
(+ 1.0 (* (* y y) -0.16666666666666666))
(+
1.0
(*
(* x x)
(+
0.5
(* x (* x (+ 0.041666666666666664 (* (* x x) 0.001388888888888889)))))))))
double code(double x, double y) {
return (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 + ((y * y) * (-0.16666666666666666d0))) * (1.0d0 + ((x * x) * (0.5d0 + (x * (x * (0.041666666666666664d0 + ((x * x) * 0.001388888888888889d0)))))))
end function
public static double code(double x, double y) {
return (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))));
}
def code(x, y): return (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889)))))))
function code(x, y) return Float64(Float64(1.0 + Float64(Float64(y * 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)))))))) end
function tmp = code(x, y) tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + ((x * x) * 0.001388888888888889))))))); end
code[x_, y_] := N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $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]
\begin{array}{l}
\\
\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\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)
\end{array}
Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6463.8%
Simplified63.8%
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-*.f6459.1%
Simplified59.1%
Final simplification59.1%
(FPCore (x y)
:precision binary64
(if (<= y 380.0)
(+
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 <= 380.0) {
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 <= 380.0d0) 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 <= 380.0) {
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 <= 380.0: 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 <= 380.0) 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(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 <= 380.0) 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, 380.0], 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[(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 380:\\
\;\;\;\;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}:\\
\;\;\;\;x \cdot \left(x \cdot \left(0.5 + \left(y \cdot y\right) \cdot -0.08333333333333333\right)\right)\\
\end{array}
\end{array}
if y < 380Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6474.1%
Simplified74.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-*.f6467.8%
Simplified67.8%
Taylor expanded in y 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
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.5%
Simplified65.5%
if 380 < y Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6433.3%
Simplified33.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.5%
Simplified30.5%
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-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
metadata-evalN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.8%
Simplified30.8%
Final simplification56.7%
(FPCore (x y)
:precision binary64
(if (<= x 1.75e+77)
(+ 1.0 (* (* y y) -0.16666666666666666))
(if (<= x 4.8e+149)
(* x (* x (* (* x x) 0.041666666666666664)))
(* x (* x (+ 0.5 (* (* y y) -0.08333333333333333)))))))
double code(double x, double y) {
double tmp;
if (x <= 1.75e+77) {
tmp = 1.0 + ((y * y) * -0.16666666666666666);
} else if (x <= 4.8e+149) {
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 <= 1.75d+77) then
tmp = 1.0d0 + ((y * y) * (-0.16666666666666666d0))
else if (x <= 4.8d+149) 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 <= 1.75e+77) {
tmp = 1.0 + ((y * y) * -0.16666666666666666);
} else if (x <= 4.8e+149) {
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 <= 1.75e+77: tmp = 1.0 + ((y * y) * -0.16666666666666666) elif x <= 4.8e+149: 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 <= 1.75e+77) tmp = Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)); elseif (x <= 4.8e+149) 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 <= 1.75e+77) tmp = 1.0 + ((y * y) * -0.16666666666666666); elseif (x <= 4.8e+149) 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, 1.75e+77], N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.8e+149], 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 1.75 \cdot 10^{+77}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot -0.16666666666666666\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+149}:\\
\;\;\;\;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 < 1.7500000000000001e77Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.4%
Simplified58.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.4%
Simplified32.4%
if 1.7500000000000001e77 < x < 4.80000000000000024e149Initial program 100.0%
Taylor expanded in y around 0
Simplified64.3%
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
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6464.3%
Simplified64.3%
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-*.f6464.3%
Simplified64.3%
if 4.80000000000000024e149 < x Initial program 100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.9%
Simplified83.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.9%
Simplified83.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-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
metadata-evalN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.9%
Simplified83.9%
Final simplification40.4%
(FPCore (x y) :precision binary64 (* (+ 1.0 (* (* x x) (+ 0.5 (* x (* x 0.041666666666666664))))) (+ 1.0 (* (* y y) -0.16666666666666666))))
double code(double x, double y) {
return (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + ((y * y) * -0.16666666666666666));
}
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))))) * (1.0d0 + ((y * y) * (-0.16666666666666666d0)))
end function
public static double code(double x, double y) {
return (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + ((y * y) * -0.16666666666666666));
}
def code(x, y): return (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + ((y * y) * -0.16666666666666666))
function code(x, y) return Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664))))) * Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666))) end
function tmp = code(x, y) tmp = (1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) * (1.0 + ((y * y) * -0.16666666666666666)); end
code[x_, y_] := 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[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)
\end{array}
Initial program 99.9%
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-*.f6486.8%
Simplified86.8%
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
*-lowering-*.f64N/A
Simplified58.2%
Final simplification58.2%
(FPCore (x y) :precision binary64 (if (<= y 380.0) (+ 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 <= 380.0) {
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 <= 380.0d0) 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 <= 380.0) {
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 <= 380.0: 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 <= 380.0) tmp = Float64(1.0 + Float64(Float64(x * 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 <= 380.0) 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, 380.0], N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $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 380:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \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 y < 380Initial program 100.0%
Taylor expanded in y around 0
Simplified73.4%
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
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6462.9%
Simplified62.9%
if 380 < y Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6433.3%
Simplified33.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.5%
Simplified30.5%
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-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
metadata-evalN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.8%
Simplified30.8%
Final simplification54.7%
(FPCore (x y) :precision binary64 (if (<= y 380.0) (+ 1.0 (* (* x x) (* (* x x) 0.041666666666666664))) (* x (* x (+ 0.5 (* (* y y) -0.08333333333333333))))))
double code(double x, double y) {
double tmp;
if (y <= 380.0) {
tmp = 1.0 + ((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 (y <= 380.0d0) then
tmp = 1.0d0 + ((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 (y <= 380.0) {
tmp = 1.0 + ((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 y <= 380.0: tmp = 1.0 + ((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 (y <= 380.0) tmp = Float64(1.0 + Float64(Float64(x * 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 (y <= 380.0) tmp = 1.0 + ((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[y, 380.0], N[(1.0 + N[(N[(x * x), $MachinePrecision] * 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}\;y \leq 380:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot 0.041666666666666664\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 < 380Initial program 100.0%
Taylor expanded in y around 0
Simplified73.4%
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
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6462.9%
Simplified62.9%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.5%
Simplified62.5%
if 380 < y Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6433.3%
Simplified33.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.5%
Simplified30.5%
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-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
metadata-evalN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.8%
Simplified30.8%
Final simplification54.4%
(FPCore (x y) :precision binary64 (if (<= x 1.95e+77) (+ 1.0 (* (* y y) -0.16666666666666666)) (* x (* x (* (* x x) 0.041666666666666664)))))
double code(double x, double y) {
double tmp;
if (x <= 1.95e+77) {
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 <= 1.95d+77) 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 <= 1.95e+77) {
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 <= 1.95e+77: 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 <= 1.95e+77) 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 <= 1.95e+77) 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, 1.95e+77], 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 1.95 \cdot 10^{+77}:\\
\;\;\;\;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 < 1.9499999999999999e77Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.4%
Simplified58.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.4%
Simplified32.4%
if 1.9499999999999999e77 < x Initial program 100.0%
Taylor expanded in y around 0
Simplified64.4%
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
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6464.4%
Simplified64.4%
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-*.f6464.4%
Simplified64.4%
(FPCore (x y) :precision binary64 (if (<= y 6.6e+174) (+ 1.0 (* (* x x) 0.5)) (+ 1.0 (* (* y y) -0.16666666666666666))))
double code(double x, double y) {
double tmp;
if (y <= 6.6e+174) {
tmp = 1.0 + ((x * x) * 0.5);
} else {
tmp = 1.0 + ((y * y) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 6.6d+174) then
tmp = 1.0d0 + ((x * x) * 0.5d0)
else
tmp = 1.0d0 + ((y * y) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 6.6e+174) {
tmp = 1.0 + ((x * x) * 0.5);
} else {
tmp = 1.0 + ((y * y) * -0.16666666666666666);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 6.6e+174: tmp = 1.0 + ((x * x) * 0.5) else: tmp = 1.0 + ((y * y) * -0.16666666666666666) return tmp
function code(x, y) tmp = 0.0 if (y <= 6.6e+174) tmp = Float64(1.0 + Float64(Float64(x * x) * 0.5)); else tmp = Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 6.6e+174) tmp = 1.0 + ((x * x) * 0.5); else tmp = 1.0 + ((y * y) * -0.16666666666666666); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 6.6e+174], N[(1.0 + N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.6 \cdot 10^{+174}:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot 0.5\\
\mathbf{else}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot -0.16666666666666666\\
\end{array}
\end{array}
if y < 6.6000000000000001e174Initial program 99.9%
Taylor expanded in y around 0
Simplified65.7%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6447.1%
Simplified47.1%
if 6.6000000000000001e174 < y Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6433.1%
Simplified33.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6433.1%
Simplified33.1%
Final simplification45.4%
(FPCore (x y) :precision binary64 (if (<= x 1.4) 1.0 (* (* x x) 0.5)))
double code(double x, double y) {
double tmp;
if (x <= 1.4) {
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 <= 1.4d0) 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 <= 1.4) {
tmp = 1.0;
} else {
tmp = (x * x) * 0.5;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.4: tmp = 1.0 else: tmp = (x * x) * 0.5 return tmp
function code(x, y) tmp = 0.0 if (x <= 1.4) 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 <= 1.4) tmp = 1.0; else tmp = (x * x) * 0.5; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.4], 1.0, N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.4:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot 0.5\\
\end{array}
\end{array}
if x < 1.3999999999999999Initial program 99.9%
Taylor expanded in y around 0
Simplified57.3%
Taylor expanded in x around 0
Simplified28.7%
if 1.3999999999999999 < x Initial program 100.0%
Taylor expanded in y around 0
Simplified68.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6435.6%
Simplified35.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6435.6%
Simplified35.6%
Final simplification30.3%
(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
Simplified59.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.4%
Simplified42.4%
Final simplification42.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
Simplified59.9%
Taylor expanded in x around 0
Simplified22.6%
(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 2024138
(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)))