
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
Initial program 100.0%
(FPCore (x y) :precision binary64 (let* ((t_0 (/ (sinh y) y))) (if (<= t_0 1.02) (sin x) (* x t_0))))
double code(double x, double y) {
double t_0 = sinh(y) / y;
double tmp;
if (t_0 <= 1.02) {
tmp = sin(x);
} else {
tmp = x * 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 = sinh(y) / y
if (t_0 <= 1.02d0) then
tmp = sin(x)
else
tmp = x * t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sinh(y) / y;
double tmp;
if (t_0 <= 1.02) {
tmp = Math.sin(x);
} else {
tmp = x * t_0;
}
return tmp;
}
def code(x, y): t_0 = math.sinh(y) / y tmp = 0 if t_0 <= 1.02: tmp = math.sin(x) else: tmp = x * t_0 return tmp
function code(x, y) t_0 = Float64(sinh(y) / y) tmp = 0.0 if (t_0 <= 1.02) tmp = sin(x); else tmp = Float64(x * t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = sinh(y) / y; tmp = 0.0; if (t_0 <= 1.02) tmp = sin(x); else tmp = x * t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$0, 1.02], N[Sin[x], $MachinePrecision], N[(x * t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y}{y}\\
\mathbf{if}\;t\_0 \leq 1.02:\\
\;\;\;\;\sin x\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\_0\\
\end{array}
\end{array}
if (/.f64 (sinh.f64 y) y) < 1.02Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6499.3%
Simplified99.3%
if 1.02 < (/.f64 (sinh.f64 y) y) Initial program 100.0%
Taylor expanded in x around 0
Simplified84.2%
(FPCore (x y)
:precision binary64
(if (<= y 0.016)
(* (sin x) (+ 1.0 (* y (* y 0.16666666666666666))))
(if (<= y 2e+44)
(* (/ (sinh y) y) (* x (+ 1.0 (* (* x x) -0.16666666666666666))))
(if (<= y 1.05e+103)
(*
x
(/
(*
y
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
y
(*
y
(+ 0.008333333333333333 (* y (* y 0.0001984126984126984)))))))))
y))
(/ (* (sin x) (* y (+ 1.0 (* 0.16666666666666666 (* y y))))) y)))))
double code(double x, double y) {
double tmp;
if (y <= 0.016) {
tmp = sin(x) * (1.0 + (y * (y * 0.16666666666666666)));
} else if (y <= 2e+44) {
tmp = (sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666)));
} else if (y <= 1.05e+103) {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y);
} else {
tmp = (sin(x) * (y * (1.0 + (0.16666666666666666 * (y * 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 <= 0.016d0) then
tmp = sin(x) * (1.0d0 + (y * (y * 0.16666666666666666d0)))
else if (y <= 2d+44) then
tmp = (sinh(y) / y) * (x * (1.0d0 + ((x * x) * (-0.16666666666666666d0))))
else if (y <= 1.05d+103) then
tmp = x * ((y * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0))))))))) / y)
else
tmp = (sin(x) * (y * (1.0d0 + (0.16666666666666666d0 * (y * y))))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 0.016) {
tmp = Math.sin(x) * (1.0 + (y * (y * 0.16666666666666666)));
} else if (y <= 2e+44) {
tmp = (Math.sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666)));
} else if (y <= 1.05e+103) {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y);
} else {
tmp = (Math.sin(x) * (y * (1.0 + (0.16666666666666666 * (y * y))))) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 0.016: tmp = math.sin(x) * (1.0 + (y * (y * 0.16666666666666666))) elif y <= 2e+44: tmp = (math.sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666))) elif y <= 1.05e+103: tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y) else: tmp = (math.sin(x) * (y * (1.0 + (0.16666666666666666 * (y * y))))) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 0.016) tmp = Float64(sin(x) * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666)))); elseif (y <= 2e+44) tmp = Float64(Float64(sinh(y) / y) * Float64(x * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666)))); elseif (y <= 1.05e+103) tmp = Float64(x * Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984))))))))) / y)); else tmp = Float64(Float64(sin(x) * Float64(y * Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y))))) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 0.016) tmp = sin(x) * (1.0 + (y * (y * 0.16666666666666666))); elseif (y <= 2e+44) tmp = (sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666))); elseif (y <= 1.05e+103) tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y); else tmp = (sin(x) * (y * (1.0 + (0.16666666666666666 * (y * y))))) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 0.016], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+44], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+103], N[(x * N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(y * N[(y * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[x], $MachinePrecision] * N[(y * N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.016:\\
\;\;\;\;\sin x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+44}:\\
\;\;\;\;\frac{\sinh y}{y} \cdot \left(x \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+103}:\\
\;\;\;\;x \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin x \cdot \left(y \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\right)}{y}\\
\end{array}
\end{array}
if y < 0.016Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6483.1%
Simplified83.1%
if 0.016 < y < 2.0000000000000002e44Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.0%
Simplified90.0%
if 2.0000000000000002e44 < y < 1.0500000000000001e103Initial program 100.0%
Taylor expanded in x around 0
Simplified100.0%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-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-*.f64100.0%
Simplified100.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
if 1.0500000000000001e103 < y Initial program 100.0%
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification86.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sin x) (+ 1.0 (* y (* y 0.16666666666666666))))))
(if (<= y 0.036)
t_0
(if (<= y 5e+45)
(* (/ (sinh y) y) (* x (+ 1.0 (* (* x x) -0.16666666666666666))))
(if (<= y 3.3e+154)
(*
x
(/
(*
y
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
y
(*
y
(+
0.008333333333333333
(* y (* y 0.0001984126984126984)))))))))
y))
t_0)))))
double code(double x, double y) {
double t_0 = sin(x) * (1.0 + (y * (y * 0.16666666666666666)));
double tmp;
if (y <= 0.036) {
tmp = t_0;
} else if (y <= 5e+45) {
tmp = (sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666)));
} else if (y <= 3.3e+154) {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y);
} 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(x) * (1.0d0 + (y * (y * 0.16666666666666666d0)))
if (y <= 0.036d0) then
tmp = t_0
else if (y <= 5d+45) then
tmp = (sinh(y) / y) * (x * (1.0d0 + ((x * x) * (-0.16666666666666666d0))))
else if (y <= 3.3d+154) then
tmp = x * ((y * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0))))))))) / y)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sin(x) * (1.0 + (y * (y * 0.16666666666666666)));
double tmp;
if (y <= 0.036) {
tmp = t_0;
} else if (y <= 5e+45) {
tmp = (Math.sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666)));
} else if (y <= 3.3e+154) {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = math.sin(x) * (1.0 + (y * (y * 0.16666666666666666))) tmp = 0 if y <= 0.036: tmp = t_0 elif y <= 5e+45: tmp = (math.sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666))) elif y <= 3.3e+154: tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(sin(x) * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666)))) tmp = 0.0 if (y <= 0.036) tmp = t_0; elseif (y <= 5e+45) tmp = Float64(Float64(sinh(y) / y) * Float64(x * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666)))); elseif (y <= 3.3e+154) tmp = Float64(x * Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984))))))))) / y)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = sin(x) * (1.0 + (y * (y * 0.16666666666666666))); tmp = 0.0; if (y <= 0.036) tmp = t_0; elseif (y <= 5e+45) tmp = (sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666))); elseif (y <= 3.3e+154) tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 0.036], t$95$0, If[LessEqual[y, 5e+45], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+154], N[(x * N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(y * N[(y * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\mathbf{if}\;y \leq 0.036:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+45}:\\
\;\;\;\;\frac{\sinh y}{y} \cdot \left(x \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+154}:\\
\;\;\;\;x \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < 0.0359999999999999973 or 3.3e154 < y Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6485.2%
Simplified85.2%
if 0.0359999999999999973 < y < 5e45Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.0%
Simplified90.0%
if 5e45 < y < 3.3e154Initial program 100.0%
Taylor expanded in x around 0
Simplified100.0%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-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-*.f64100.0%
Simplified100.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
Final simplification86.3%
(FPCore (x y) :precision binary64 (let* ((t_0 (* (sin x) (+ 1.0 (* y (* y 0.16666666666666666)))))) (if (<= y 0.165) t_0 (if (<= y 3.3e+154) (/ (* x (sinh y)) y) t_0))))
double code(double x, double y) {
double t_0 = sin(x) * (1.0 + (y * (y * 0.16666666666666666)));
double tmp;
if (y <= 0.165) {
tmp = t_0;
} else if (y <= 3.3e+154) {
tmp = (x * sinh(y)) / y;
} 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(x) * (1.0d0 + (y * (y * 0.16666666666666666d0)))
if (y <= 0.165d0) then
tmp = t_0
else if (y <= 3.3d+154) then
tmp = (x * sinh(y)) / y
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sin(x) * (1.0 + (y * (y * 0.16666666666666666)));
double tmp;
if (y <= 0.165) {
tmp = t_0;
} else if (y <= 3.3e+154) {
tmp = (x * Math.sinh(y)) / y;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = math.sin(x) * (1.0 + (y * (y * 0.16666666666666666))) tmp = 0 if y <= 0.165: tmp = t_0 elif y <= 3.3e+154: tmp = (x * math.sinh(y)) / y else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(sin(x) * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666)))) tmp = 0.0 if (y <= 0.165) tmp = t_0; elseif (y <= 3.3e+154) tmp = Float64(Float64(x * sinh(y)) / y); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = sin(x) * (1.0 + (y * (y * 0.16666666666666666))); tmp = 0.0; if (y <= 0.165) tmp = t_0; elseif (y <= 3.3e+154) tmp = (x * sinh(y)) / y; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 0.165], t$95$0, If[LessEqual[y, 3.3e+154], N[(N[(x * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\mathbf{if}\;y \leq 0.165:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+154}:\\
\;\;\;\;\frac{x \cdot \sinh y}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < 0.165000000000000008 or 3.3e154 < y Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6485.2%
Simplified85.2%
if 0.165000000000000008 < y < 3.3e154Initial program 100.0%
Taylor expanded in x around 0
Simplified80.8%
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6480.8%
Applied egg-rr80.8%
(FPCore (x y) :precision binary64 (if (<= y 0.082) (sin x) (/ (* x (sinh y)) y)))
double code(double x, double y) {
double tmp;
if (y <= 0.082) {
tmp = sin(x);
} else {
tmp = (x * sinh(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 <= 0.082d0) then
tmp = sin(x)
else
tmp = (x * sinh(y)) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 0.082) {
tmp = Math.sin(x);
} else {
tmp = (x * Math.sinh(y)) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 0.082: tmp = math.sin(x) else: tmp = (x * math.sinh(y)) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 0.082) tmp = sin(x); else tmp = Float64(Float64(x * sinh(y)) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 0.082) tmp = sin(x); else tmp = (x * sinh(y)) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 0.082], N[Sin[x], $MachinePrecision], N[(N[(x * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.082:\\
\;\;\;\;\sin x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \sinh y}{y}\\
\end{array}
\end{array}
if y < 0.0820000000000000034Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6468.2%
Simplified68.2%
if 0.0820000000000000034 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified81.8%
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sinh-lowering-sinh.f6481.8%
Applied egg-rr81.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (* (* x x) -0.16666666666666666))))
(if (<= y 0.00056)
(sin x)
(if (<= y 1.05e+44)
(+
(*
(* y y)
(*
(* t_0 (* x (* y y)))
(+ 0.008333333333333333 (* (* y y) 0.0001984126984126984))))
(* t_0 (* x (+ 1.0 (* 0.16666666666666666 (* y y))))))
(*
x
(/
(*
y
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
y
(*
y
(+ 0.008333333333333333 (* y (* y 0.0001984126984126984)))))))))
y))))))
double code(double x, double y) {
double t_0 = 1.0 + ((x * x) * -0.16666666666666666);
double tmp;
if (y <= 0.00056) {
tmp = sin(x);
} else if (y <= 1.05e+44) {
tmp = ((y * y) * ((t_0 * (x * (y * y))) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))) + (t_0 * (x * (1.0 + (0.16666666666666666 * (y * y)))));
} else {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 + ((x * x) * (-0.16666666666666666d0))
if (y <= 0.00056d0) then
tmp = sin(x)
else if (y <= 1.05d+44) then
tmp = ((y * y) * ((t_0 * (x * (y * y))) * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)))) + (t_0 * (x * (1.0d0 + (0.16666666666666666d0 * (y * y)))))
else
tmp = x * ((y * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0))))))))) / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + ((x * x) * -0.16666666666666666);
double tmp;
if (y <= 0.00056) {
tmp = Math.sin(x);
} else if (y <= 1.05e+44) {
tmp = ((y * y) * ((t_0 * (x * (y * y))) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))) + (t_0 * (x * (1.0 + (0.16666666666666666 * (y * y)))));
} else {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y);
}
return tmp;
}
def code(x, y): t_0 = 1.0 + ((x * x) * -0.16666666666666666) tmp = 0 if y <= 0.00056: tmp = math.sin(x) elif y <= 1.05e+44: tmp = ((y * y) * ((t_0 * (x * (y * y))) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))) + (t_0 * (x * (1.0 + (0.16666666666666666 * (y * y))))) else: tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y) return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666)) tmp = 0.0 if (y <= 0.00056) tmp = sin(x); elseif (y <= 1.05e+44) tmp = Float64(Float64(Float64(y * y) * Float64(Float64(t_0 * Float64(x * Float64(y * y))) * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)))) + Float64(t_0 * Float64(x * Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y)))))); else tmp = Float64(x * Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984))))))))) / y)); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + ((x * x) * -0.16666666666666666); tmp = 0.0; if (y <= 0.00056) tmp = sin(x); elseif (y <= 1.05e+44) tmp = ((y * y) * ((t_0 * (x * (y * y))) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))) + (t_0 * (x * (1.0 + (0.16666666666666666 * (y * y))))); else tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 0.00056], N[Sin[x], $MachinePrecision], If[LessEqual[y, 1.05e+44], N[(N[(N[(y * y), $MachinePrecision] * N[(N[(t$95$0 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(x * N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(y * N[(y * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \left(x \cdot x\right) \cdot -0.16666666666666666\\
\mathbf{if}\;y \leq 0.00056:\\
\;\;\;\;\sin x\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+44}:\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(\left(t\_0 \cdot \left(x \cdot \left(y \cdot y\right)\right)\right) \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right) + t\_0 \cdot \left(x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)\right)\right)}{y}\\
\end{array}
\end{array}
if y < 5.5999999999999995e-4Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6468.2%
Simplified68.2%
if 5.5999999999999995e-4 < y < 1.04999999999999993e44Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.9%
Simplified88.9%
Taylor expanded in y around 0
Simplified56.9%
if 1.04999999999999993e44 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified89.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-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-*.f6487.0%
Simplified87.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6487.0%
Applied egg-rr87.0%
Final simplification71.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (* 0.16666666666666666 (* y y)))))
(if (<= y 1.8e+44)
(*
x
(+
(*
(* x x)
(*
(* x x)
(* t_0 (+ 0.008333333333333333 (* (* x x) -0.0001984126984126984)))))
(* (+ 1.0 (* (* x x) -0.16666666666666666)) t_0)))
(*
x
(/
(*
y
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
y
(*
y
(+ 0.008333333333333333 (* y (* y 0.0001984126984126984)))))))))
y)))))
double code(double x, double y) {
double t_0 = 1.0 + (0.16666666666666666 * (y * y));
double tmp;
if (y <= 1.8e+44) {
tmp = x * (((x * x) * ((x * x) * (t_0 * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))) + ((1.0 + ((x * x) * -0.16666666666666666)) * t_0));
} else {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 + (0.16666666666666666d0 * (y * y))
if (y <= 1.8d+44) then
tmp = x * (((x * x) * ((x * x) * (t_0 * (0.008333333333333333d0 + ((x * x) * (-0.0001984126984126984d0)))))) + ((1.0d0 + ((x * x) * (-0.16666666666666666d0))) * t_0))
else
tmp = x * ((y * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0))))))))) / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (0.16666666666666666 * (y * y));
double tmp;
if (y <= 1.8e+44) {
tmp = x * (((x * x) * ((x * x) * (t_0 * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))) + ((1.0 + ((x * x) * -0.16666666666666666)) * t_0));
} else {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y);
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (0.16666666666666666 * (y * y)) tmp = 0 if y <= 1.8e+44: tmp = x * (((x * x) * ((x * x) * (t_0 * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))) + ((1.0 + ((x * x) * -0.16666666666666666)) * t_0)) else: tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y) return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y))) tmp = 0.0 if (y <= 1.8e+44) tmp = Float64(x * Float64(Float64(Float64(x * x) * Float64(Float64(x * x) * Float64(t_0 * Float64(0.008333333333333333 + Float64(Float64(x * x) * -0.0001984126984126984))))) + Float64(Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666)) * t_0))); else tmp = Float64(x * Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984))))))))) / y)); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (0.16666666666666666 * (y * y)); tmp = 0.0; if (y <= 1.8e+44) tmp = x * (((x * x) * ((x * x) * (t_0 * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))) + ((1.0 + ((x * x) * -0.16666666666666666)) * t_0)); else tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.8e+44], N[(x * N[(N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(t$95$0 * N[(0.008333333333333333 + N[(N[(x * x), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(y * N[(y * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq 1.8 \cdot 10^{+44}:\\
\;\;\;\;x \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(t\_0 \cdot \left(0.008333333333333333 + \left(x \cdot x\right) \cdot -0.0001984126984126984\right)\right)\right) + \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right) \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)\right)\right)}{y}\\
\end{array}
\end{array}
if y < 1.8e44Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6479.6%
Simplified79.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
associate-+r+N/A
distribute-rgt-inN/A
associate-+r+N/A
Simplified45.7%
if 1.8e44 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified89.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-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-*.f6487.0%
Simplified87.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6487.0%
Applied egg-rr87.0%
Final simplification53.1%
(FPCore (x y)
:precision binary64
(if (<= y 1.3e+44)
(*
x
(+
1.0
(*
(* x x)
(+
-0.16666666666666666
(*
(* x x)
(+ 0.008333333333333333 (* (* x x) -0.0001984126984126984)))))))
(*
x
(/
(*
y
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
y
(* y (+ 0.008333333333333333 (* y (* y 0.0001984126984126984)))))))))
y))))
double code(double x, double y) {
double tmp;
if (y <= 1.3e+44) {
tmp = x * (1.0 + ((x * x) * (-0.16666666666666666 + ((x * x) * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))));
} else {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.3d+44) then
tmp = x * (1.0d0 + ((x * x) * ((-0.16666666666666666d0) + ((x * x) * (0.008333333333333333d0 + ((x * x) * (-0.0001984126984126984d0)))))))
else
tmp = x * ((y * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0))))))))) / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.3e+44) {
tmp = x * (1.0 + ((x * x) * (-0.16666666666666666 + ((x * x) * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))));
} else {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.3e+44: tmp = x * (1.0 + ((x * x) * (-0.16666666666666666 + ((x * x) * (0.008333333333333333 + ((x * x) * -0.0001984126984126984)))))) else: tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.3e+44) tmp = Float64(x * Float64(1.0 + Float64(Float64(x * x) * Float64(-0.16666666666666666 + Float64(Float64(x * x) * Float64(0.008333333333333333 + Float64(Float64(x * x) * -0.0001984126984126984))))))); else tmp = Float64(x * Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984))))))))) / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.3e+44) tmp = x * (1.0 + ((x * x) * (-0.16666666666666666 + ((x * x) * (0.008333333333333333 + ((x * x) * -0.0001984126984126984)))))); else tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))))) / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.3e+44], N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(x * x), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(x * x), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(y * N[(y * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.3 \cdot 10^{+44}:\\
\;\;\;\;x \cdot \left(1 + \left(x \cdot x\right) \cdot \left(-0.16666666666666666 + \left(x \cdot x\right) \cdot \left(0.008333333333333333 + \left(x \cdot x\right) \cdot -0.0001984126984126984\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)\right)\right)}{y}\\
\end{array}
\end{array}
if y < 1.3e44Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6465.4%
Simplified65.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6443.2%
Simplified43.2%
if 1.3e44 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified89.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-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-*.f6487.0%
Simplified87.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6487.0%
Applied egg-rr87.0%
Final simplification51.1%
(FPCore (x y)
:precision binary64
(if (<= y 8e+43)
(*
x
(+
1.0
(*
(* x x)
(+
-0.16666666666666666
(*
(* x x)
(+ 0.008333333333333333 (* (* x x) -0.0001984126984126984)))))))
(*
x
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
y
(* y (+ 0.008333333333333333 (* (* y y) 0.0001984126984126984))))))))))
double code(double x, double y) {
double tmp;
if (y <= 8e+43) {
tmp = x * (1.0 + ((x * x) * (-0.16666666666666666 + ((x * x) * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))));
} else {
tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 8d+43) then
tmp = x * (1.0d0 + ((x * x) * ((-0.16666666666666666d0) + ((x * x) * (0.008333333333333333d0 + ((x * x) * (-0.0001984126984126984d0)))))))
else
tmp = x * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 8e+43) {
tmp = x * (1.0 + ((x * x) * (-0.16666666666666666 + ((x * x) * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))));
} else {
tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 8e+43: tmp = x * (1.0 + ((x * x) * (-0.16666666666666666 + ((x * x) * (0.008333333333333333 + ((x * x) * -0.0001984126984126984)))))) else: tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))) return tmp
function code(x, y) tmp = 0.0 if (y <= 8e+43) tmp = Float64(x * Float64(1.0 + Float64(Float64(x * x) * Float64(-0.16666666666666666 + Float64(Float64(x * x) * Float64(0.008333333333333333 + Float64(Float64(x * x) * -0.0001984126984126984))))))); else tmp = Float64(x * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 8e+43) tmp = x * (1.0 + ((x * x) * (-0.16666666666666666 + ((x * x) * (0.008333333333333333 + ((x * x) * -0.0001984126984126984)))))); else tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 8e+43], N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(x * x), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(x * x), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8 \cdot 10^{+43}:\\
\;\;\;\;x \cdot \left(1 + \left(x \cdot x\right) \cdot \left(-0.16666666666666666 + \left(x \cdot x\right) \cdot \left(0.008333333333333333 + \left(x \cdot x\right) \cdot -0.0001984126984126984\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\\
\end{array}
\end{array}
if y < 8.00000000000000011e43Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6465.4%
Simplified65.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6443.2%
Simplified43.2%
if 8.00000000000000011e43 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified89.1%
Taylor expanded in y 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-*.f6487.0%
Simplified87.0%
(FPCore (x y)
:precision binary64
(if (<= y 6.6e+43)
(*
x
(+
1.0
(*
(* x x)
(+
-0.16666666666666666
(*
(* x x)
(+ 0.008333333333333333 (* (* x x) -0.0001984126984126984)))))))
(/ (* x (* y (* y (* 0.008333333333333333 (* y (* y y)))))) y)))
double code(double x, double y) {
double tmp;
if (y <= 6.6e+43) {
tmp = x * (1.0 + ((x * x) * (-0.16666666666666666 + ((x * x) * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))));
} else {
tmp = (x * (y * (y * (0.008333333333333333 * (y * (y * 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 <= 6.6d+43) then
tmp = x * (1.0d0 + ((x * x) * ((-0.16666666666666666d0) + ((x * x) * (0.008333333333333333d0 + ((x * x) * (-0.0001984126984126984d0)))))))
else
tmp = (x * (y * (y * (0.008333333333333333d0 * (y * (y * y)))))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 6.6e+43) {
tmp = x * (1.0 + ((x * x) * (-0.16666666666666666 + ((x * x) * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))));
} else {
tmp = (x * (y * (y * (0.008333333333333333 * (y * (y * y)))))) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 6.6e+43: tmp = x * (1.0 + ((x * x) * (-0.16666666666666666 + ((x * x) * (0.008333333333333333 + ((x * x) * -0.0001984126984126984)))))) else: tmp = (x * (y * (y * (0.008333333333333333 * (y * (y * y)))))) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 6.6e+43) tmp = Float64(x * Float64(1.0 + Float64(Float64(x * x) * Float64(-0.16666666666666666 + Float64(Float64(x * x) * Float64(0.008333333333333333 + Float64(Float64(x * x) * -0.0001984126984126984))))))); else tmp = Float64(Float64(x * Float64(y * Float64(y * Float64(0.008333333333333333 * Float64(y * Float64(y * y)))))) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 6.6e+43) tmp = x * (1.0 + ((x * x) * (-0.16666666666666666 + ((x * x) * (0.008333333333333333 + ((x * x) * -0.0001984126984126984)))))); else tmp = (x * (y * (y * (0.008333333333333333 * (y * (y * y)))))) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 6.6e+43], N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(x * x), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(x * x), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(y * N[(y * N[(0.008333333333333333 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.6 \cdot 10^{+43}:\\
\;\;\;\;x \cdot \left(1 + \left(x \cdot x\right) \cdot \left(-0.16666666666666666 + \left(x \cdot x\right) \cdot \left(0.008333333333333333 + \left(x \cdot x\right) \cdot -0.0001984126984126984\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(y \cdot \left(y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right)\right)}{y}\\
\end{array}
\end{array}
if y < 6.6000000000000003e43Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6465.4%
Simplified65.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6443.2%
Simplified43.2%
if 6.6000000000000003e43 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified89.1%
Taylor expanded in y around 0
*-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-*.f6484.9%
Simplified84.9%
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6484.9%
Applied egg-rr84.9%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6484.9%
Simplified84.9%
(FPCore (x y)
:precision binary64
(*
x
(/
(*
y
(+
1.0
(* (* y y) (+ 0.16666666666666666 (* y (* y 0.008333333333333333))))))
y)))
double code(double x, double y) {
return x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))))) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x * ((y * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0)))))) / y)
end function
public static double code(double x, double y) {
return x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))))) / y);
}
def code(x, y): return x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))))) / y)
function code(x, y) return Float64(x * Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333)))))) / y)) end
function tmp = code(x, y) tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))))) / y); end
code[x_, y_] := N[(x * N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)}{y}
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified69.1%
Taylor expanded in y around 0
*-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.4%
Simplified64.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6464.4%
Applied egg-rr64.4%
Final simplification64.4%
(FPCore (x y) :precision binary64 (if (<= y 5e+30) (* x (+ 1.0 (* x (* x -0.16666666666666666)))) (* x (* y (* y (* (* y y) 0.008333333333333333))))))
double code(double x, double y) {
double tmp;
if (y <= 5e+30) {
tmp = x * (1.0 + (x * (x * -0.16666666666666666)));
} else {
tmp = x * (y * (y * ((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 <= 5d+30) then
tmp = x * (1.0d0 + (x * (x * (-0.16666666666666666d0))))
else
tmp = x * (y * (y * ((y * y) * 0.008333333333333333d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 5e+30) {
tmp = x * (1.0 + (x * (x * -0.16666666666666666)));
} else {
tmp = x * (y * (y * ((y * y) * 0.008333333333333333)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5e+30: tmp = x * (1.0 + (x * (x * -0.16666666666666666))) else: tmp = x * (y * (y * ((y * y) * 0.008333333333333333))) return tmp
function code(x, y) tmp = 0.0 if (y <= 5e+30) tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * -0.16666666666666666)))); else tmp = Float64(x * Float64(y * Float64(y * Float64(Float64(y * y) * 0.008333333333333333)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 5e+30) tmp = x * (1.0 + (x * (x * -0.16666666666666666))); else tmp = x * (y * (y * ((y * y) * 0.008333333333333333))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5e+30], N[(x * N[(1.0 + N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if y < 4.9999999999999998e30Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6467.2%
Simplified67.2%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-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
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6446.4%
Simplified46.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6441.6%
Simplified41.6%
if 4.9999999999999998e30 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified84.6%
Taylor expanded in y around 0
*-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.2%
Simplified77.2%
Taylor expanded in y around inf
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
pow-sqrN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6477.2%
Simplified77.2%
(FPCore (x y) :precision binary64 (* x (+ 1.0 (* (* y y) (+ 0.16666666666666666 (* (* y y) 0.008333333333333333))))))
double code(double x, double y) {
return x * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * 0.008333333333333333))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x * (1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * 0.008333333333333333d0))))
end function
public static double code(double x, double y) {
return x * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * 0.008333333333333333))));
}
def code(x, y): return x * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * 0.008333333333333333))))
function code(x, y) return Float64(x * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333))))) end
function tmp = code(x, y) tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * 0.008333333333333333)))); end
code[x_, y_] := N[(x * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified69.1%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.0%
Simplified64.0%
(FPCore (x y) :precision binary64 (if (<= y 70000.0) x (* x (* 0.16666666666666666 (* y y)))))
double code(double x, double y) {
double tmp;
if (y <= 70000.0) {
tmp = x;
} else {
tmp = x * (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 <= 70000.0d0) then
tmp = x
else
tmp = x * (0.16666666666666666d0 * (y * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 70000.0) {
tmp = x;
} else {
tmp = x * (0.16666666666666666 * (y * y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 70000.0: tmp = x else: tmp = x * (0.16666666666666666 * (y * y)) return tmp
function code(x, y) tmp = 0.0 if (y <= 70000.0) tmp = x; else tmp = Float64(x * Float64(0.16666666666666666 * Float64(y * y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 70000.0) tmp = x; else tmp = x * (0.16666666666666666 * (y * y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 70000.0], x, N[(x * N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 70000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\end{array}
\end{array}
if y < 7e4Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6467.9%
Simplified67.9%
Taylor expanded in x around 0
Simplified38.7%
if 7e4 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified83.3%
Taylor expanded in y around 0
associate-*r*N/A
*-rgt-identityN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.6%
Simplified56.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.6%
Simplified56.6%
(FPCore (x y) :precision binary64 (if (<= y 50000000000000.0) x (/ (* x y) y)))
double code(double x, double y) {
double tmp;
if (y <= 50000000000000.0) {
tmp = x;
} else {
tmp = (x * 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 <= 50000000000000.0d0) then
tmp = x
else
tmp = (x * y) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 50000000000000.0) {
tmp = x;
} else {
tmp = (x * y) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 50000000000000.0: tmp = x else: tmp = (x * y) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 50000000000000.0) tmp = x; else tmp = Float64(Float64(x * y) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 50000000000000.0) tmp = x; else tmp = (x * y) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 50000000000000.0], x, N[(N[(x * y), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 50000000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{y}\\
\end{array}
\end{array}
if y < 5e13Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6467.5%
Simplified67.5%
Taylor expanded in x around 0
Simplified38.5%
if 5e13 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified84.9%
Taylor expanded in y around 0
*-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-*.f6475.8%
Simplified75.8%
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6475.8%
Applied egg-rr75.8%
Taylor expanded in y around 0
*-lowering-*.f6420.5%
Simplified20.5%
(FPCore (x y) :precision binary64 (* x (+ 1.0 (* 0.16666666666666666 (* y y)))))
double code(double x, double y) {
return x * (1.0 + (0.16666666666666666 * (y * y)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x * (1.0d0 + (0.16666666666666666d0 * (y * y)))
end function
public static double code(double x, double y) {
return x * (1.0 + (0.16666666666666666 * (y * y)));
}
def code(x, y): return x * (1.0 + (0.16666666666666666 * (y * y)))
function code(x, y) return Float64(x * Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y)))) end
function tmp = code(x, y) tmp = x * (1.0 + (0.16666666666666666 * (y * y))); end
code[x_, y_] := N[(x * N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified69.1%
Taylor expanded in y around 0
associate-*r*N/A
*-rgt-identityN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.2%
Simplified54.2%
(FPCore (x y) :precision binary64 x)
double code(double x, double y) {
return x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x
end function
public static double code(double x, double y) {
return x;
}
def code(x, y): return x
function code(x, y) return x end
function tmp = code(x, y) tmp = x; end
code[x_, y_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6454.1%
Simplified54.1%
Taylor expanded in x around 0
Simplified31.2%
herbie shell --seed 2024145
(FPCore (x y)
:name "Linear.Quaternion:$ccos from linear-1.19.1.3"
:precision binary64
(* (sin x) (/ (sinh y) y)))