
(FPCore (r a b) :precision binary64 (/ (* r (sin b)) (cos (+ a b))))
double code(double r, double a, double b) {
return (r * sin(b)) / cos((a + b));
}
real(8) function code(r, a, b)
real(8), intent (in) :: r
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (r * sin(b)) / cos((a + b))
end function
public static double code(double r, double a, double b) {
return (r * Math.sin(b)) / Math.cos((a + b));
}
def code(r, a, b): return (r * math.sin(b)) / math.cos((a + b))
function code(r, a, b) return Float64(Float64(r * sin(b)) / cos(Float64(a + b))) end
function tmp = code(r, a, b) tmp = (r * sin(b)) / cos((a + b)); end
code[r_, a_, b_] := N[(N[(r * N[Sin[b], $MachinePrecision]), $MachinePrecision] / N[Cos[N[(a + b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{r \cdot \sin b}{\cos \left(a + b\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (r a b) :precision binary64 (/ (* r (sin b)) (cos (+ a b))))
double code(double r, double a, double b) {
return (r * sin(b)) / cos((a + b));
}
real(8) function code(r, a, b)
real(8), intent (in) :: r
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (r * sin(b)) / cos((a + b))
end function
public static double code(double r, double a, double b) {
return (r * Math.sin(b)) / Math.cos((a + b));
}
def code(r, a, b): return (r * math.sin(b)) / math.cos((a + b))
function code(r, a, b) return Float64(Float64(r * sin(b)) / cos(Float64(a + b))) end
function tmp = code(r, a, b) tmp = (r * sin(b)) / cos((a + b)); end
code[r_, a_, b_] := N[(N[(r * N[Sin[b], $MachinePrecision]), $MachinePrecision] / N[Cos[N[(a + b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{r \cdot \sin b}{\cos \left(a + b\right)}
\end{array}
(FPCore (r a b)
:precision binary64
(let* ((t_0 (- (sin b))))
(/
(* r (sin b))
(+
(fma 1.0 (* (cos a) (cos b)) (* (sin a) t_0))
(fma t_0 (sin a) (* (sin b) (sin a)))))))
double code(double r, double a, double b) {
double t_0 = -sin(b);
return (r * sin(b)) / (fma(1.0, (cos(a) * cos(b)), (sin(a) * t_0)) + fma(t_0, sin(a), (sin(b) * sin(a))));
}
function code(r, a, b) t_0 = Float64(-sin(b)) return Float64(Float64(r * sin(b)) / Float64(fma(1.0, Float64(cos(a) * cos(b)), Float64(sin(a) * t_0)) + fma(t_0, sin(a), Float64(sin(b) * sin(a))))) end
code[r_, a_, b_] := Block[{t$95$0 = (-N[Sin[b], $MachinePrecision])}, N[(N[(r * N[Sin[b], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 * N[(N[Cos[a], $MachinePrecision] * N[Cos[b], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[a], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[Sin[a], $MachinePrecision] + N[(N[Sin[b], $MachinePrecision] * N[Sin[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\sin b\\
\frac{r \cdot \sin b}{\mathsf{fma}\left(1, \cos a \cdot \cos b, \sin a \cdot t_0\right) + \mathsf{fma}\left(t_0, \sin a, \sin b \cdot \sin a\right)}
\end{array}
\end{array}
Initial program 74.6%
+-commutative74.6%
Simplified74.6%
cos-sum99.4%
*-un-lft-identity99.4%
*-un-lft-identity99.4%
prod-diff99.4%
Applied egg-rr99.4%
*-rgt-identity99.4%
*-commutative99.4%
distribute-lft-neg-in99.4%
*-commutative99.4%
fma-udef99.4%
*-rgt-identity99.4%
distribute-lft-neg-in99.4%
*-rgt-identity99.4%
fma-udef99.5%
*-commutative99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (r a b) :precision binary64 (* r (/ (sin b) (- (* (cos a) (cos b)) (* (sin b) (sin a))))))
double code(double r, double a, double b) {
return r * (sin(b) / ((cos(a) * cos(b)) - (sin(b) * sin(a))));
}
real(8) function code(r, a, b)
real(8), intent (in) :: r
real(8), intent (in) :: a
real(8), intent (in) :: b
code = r * (sin(b) / ((cos(a) * cos(b)) - (sin(b) * sin(a))))
end function
public static double code(double r, double a, double b) {
return r * (Math.sin(b) / ((Math.cos(a) * Math.cos(b)) - (Math.sin(b) * Math.sin(a))));
}
def code(r, a, b): return r * (math.sin(b) / ((math.cos(a) * math.cos(b)) - (math.sin(b) * math.sin(a))))
function code(r, a, b) return Float64(r * Float64(sin(b) / Float64(Float64(cos(a) * cos(b)) - Float64(sin(b) * sin(a))))) end
function tmp = code(r, a, b) tmp = r * (sin(b) / ((cos(a) * cos(b)) - (sin(b) * sin(a)))); end
code[r_, a_, b_] := N[(r * N[(N[Sin[b], $MachinePrecision] / N[(N[(N[Cos[a], $MachinePrecision] * N[Cos[b], $MachinePrecision]), $MachinePrecision] - N[(N[Sin[b], $MachinePrecision] * N[Sin[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
r \cdot \frac{\sin b}{\cos a \cdot \cos b - \sin b \cdot \sin a}
\end{array}
Initial program 74.6%
associate-*r/74.6%
*-commutative74.6%
+-commutative74.6%
Simplified74.6%
cos-sum99.4%
Applied egg-rr99.4%
Final simplification99.4%
(FPCore (r a b) :precision binary64 (/ (* r (sin b)) (- (* (cos a) (cos b)) (* (sin b) (sin a)))))
double code(double r, double a, double b) {
return (r * sin(b)) / ((cos(a) * cos(b)) - (sin(b) * sin(a)));
}
real(8) function code(r, a, b)
real(8), intent (in) :: r
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (r * sin(b)) / ((cos(a) * cos(b)) - (sin(b) * sin(a)))
end function
public static double code(double r, double a, double b) {
return (r * Math.sin(b)) / ((Math.cos(a) * Math.cos(b)) - (Math.sin(b) * Math.sin(a)));
}
def code(r, a, b): return (r * math.sin(b)) / ((math.cos(a) * math.cos(b)) - (math.sin(b) * math.sin(a)))
function code(r, a, b) return Float64(Float64(r * sin(b)) / Float64(Float64(cos(a) * cos(b)) - Float64(sin(b) * sin(a)))) end
function tmp = code(r, a, b) tmp = (r * sin(b)) / ((cos(a) * cos(b)) - (sin(b) * sin(a))); end
code[r_, a_, b_] := N[(N[(r * N[Sin[b], $MachinePrecision]), $MachinePrecision] / N[(N[(N[Cos[a], $MachinePrecision] * N[Cos[b], $MachinePrecision]), $MachinePrecision] - N[(N[Sin[b], $MachinePrecision] * N[Sin[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{r \cdot \sin b}{\cos a \cdot \cos b - \sin b \cdot \sin a}
\end{array}
Initial program 74.6%
+-commutative74.6%
Simplified74.6%
cos-sum99.4%
Applied egg-rr99.4%
Final simplification99.4%
(FPCore (r a b) :precision binary64 (if (<= b -1.82e-6) (* r (tan b)) (if (<= b 0.0024) (* r (/ b (cos a))) (* (sin b) (/ r (cos b))))))
double code(double r, double a, double b) {
double tmp;
if (b <= -1.82e-6) {
tmp = r * tan(b);
} else if (b <= 0.0024) {
tmp = r * (b / cos(a));
} else {
tmp = sin(b) * (r / cos(b));
}
return tmp;
}
real(8) function code(r, a, b)
real(8), intent (in) :: r
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.82d-6)) then
tmp = r * tan(b)
else if (b <= 0.0024d0) then
tmp = r * (b / cos(a))
else
tmp = sin(b) * (r / cos(b))
end if
code = tmp
end function
public static double code(double r, double a, double b) {
double tmp;
if (b <= -1.82e-6) {
tmp = r * Math.tan(b);
} else if (b <= 0.0024) {
tmp = r * (b / Math.cos(a));
} else {
tmp = Math.sin(b) * (r / Math.cos(b));
}
return tmp;
}
def code(r, a, b): tmp = 0 if b <= -1.82e-6: tmp = r * math.tan(b) elif b <= 0.0024: tmp = r * (b / math.cos(a)) else: tmp = math.sin(b) * (r / math.cos(b)) return tmp
function code(r, a, b) tmp = 0.0 if (b <= -1.82e-6) tmp = Float64(r * tan(b)); elseif (b <= 0.0024) tmp = Float64(r * Float64(b / cos(a))); else tmp = Float64(sin(b) * Float64(r / cos(b))); end return tmp end
function tmp_2 = code(r, a, b) tmp = 0.0; if (b <= -1.82e-6) tmp = r * tan(b); elseif (b <= 0.0024) tmp = r * (b / cos(a)); else tmp = sin(b) * (r / cos(b)); end tmp_2 = tmp; end
code[r_, a_, b_] := If[LessEqual[b, -1.82e-6], N[(r * N[Tan[b], $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 0.0024], N[(r * N[(b / N[Cos[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[b], $MachinePrecision] * N[(r / N[Cos[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.82 \cdot 10^{-6}:\\
\;\;\;\;r \cdot \tan b\\
\mathbf{elif}\;b \leq 0.0024:\\
\;\;\;\;r \cdot \frac{b}{\cos a}\\
\mathbf{else}:\\
\;\;\;\;\sin b \cdot \frac{r}{\cos b}\\
\end{array}
\end{array}
if b < -1.8199999999999999e-6Initial program 56.9%
associate-/l*56.9%
+-commutative56.9%
Simplified56.9%
Taylor expanded in a around 0 57.7%
expm1-log1p-u41.4%
expm1-udef18.4%
clear-num18.4%
quot-tan18.4%
Applied egg-rr18.4%
expm1-def41.4%
expm1-log1p57.8%
associate-/r/57.8%
/-rgt-identity57.8%
Simplified57.8%
if -1.8199999999999999e-6 < b < 0.00239999999999999979Initial program 98.8%
associate-*r/98.9%
*-commutative98.9%
+-commutative98.9%
Simplified98.9%
Taylor expanded in b around 0 98.9%
if 0.00239999999999999979 < b Initial program 51.8%
associate-/l*51.9%
+-commutative51.9%
Simplified51.9%
associate-/l*51.8%
*-commutative51.8%
associate-*l/51.8%
div-inv51.8%
associate-*l*51.8%
Applied egg-rr51.8%
Taylor expanded in a around 0 51.4%
Final simplification74.7%
(FPCore (r a b) :precision binary64 (if (<= b -1.85e-6) (* r (tan b)) (if (<= b 0.0024) (* r (/ b (cos a))) (/ r (/ (cos b) (sin b))))))
double code(double r, double a, double b) {
double tmp;
if (b <= -1.85e-6) {
tmp = r * tan(b);
} else if (b <= 0.0024) {
tmp = r * (b / cos(a));
} else {
tmp = r / (cos(b) / sin(b));
}
return tmp;
}
real(8) function code(r, a, b)
real(8), intent (in) :: r
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.85d-6)) then
tmp = r * tan(b)
else if (b <= 0.0024d0) then
tmp = r * (b / cos(a))
else
tmp = r / (cos(b) / sin(b))
end if
code = tmp
end function
public static double code(double r, double a, double b) {
double tmp;
if (b <= -1.85e-6) {
tmp = r * Math.tan(b);
} else if (b <= 0.0024) {
tmp = r * (b / Math.cos(a));
} else {
tmp = r / (Math.cos(b) / Math.sin(b));
}
return tmp;
}
def code(r, a, b): tmp = 0 if b <= -1.85e-6: tmp = r * math.tan(b) elif b <= 0.0024: tmp = r * (b / math.cos(a)) else: tmp = r / (math.cos(b) / math.sin(b)) return tmp
function code(r, a, b) tmp = 0.0 if (b <= -1.85e-6) tmp = Float64(r * tan(b)); elseif (b <= 0.0024) tmp = Float64(r * Float64(b / cos(a))); else tmp = Float64(r / Float64(cos(b) / sin(b))); end return tmp end
function tmp_2 = code(r, a, b) tmp = 0.0; if (b <= -1.85e-6) tmp = r * tan(b); elseif (b <= 0.0024) tmp = r * (b / cos(a)); else tmp = r / (cos(b) / sin(b)); end tmp_2 = tmp; end
code[r_, a_, b_] := If[LessEqual[b, -1.85e-6], N[(r * N[Tan[b], $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 0.0024], N[(r * N[(b / N[Cos[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(r / N[(N[Cos[b], $MachinePrecision] / N[Sin[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.85 \cdot 10^{-6}:\\
\;\;\;\;r \cdot \tan b\\
\mathbf{elif}\;b \leq 0.0024:\\
\;\;\;\;r \cdot \frac{b}{\cos a}\\
\mathbf{else}:\\
\;\;\;\;\frac{r}{\frac{\cos b}{\sin b}}\\
\end{array}
\end{array}
if b < -1.8500000000000001e-6Initial program 56.9%
associate-/l*56.9%
+-commutative56.9%
Simplified56.9%
Taylor expanded in a around 0 57.7%
expm1-log1p-u41.4%
expm1-udef18.4%
clear-num18.4%
quot-tan18.4%
Applied egg-rr18.4%
expm1-def41.4%
expm1-log1p57.8%
associate-/r/57.8%
/-rgt-identity57.8%
Simplified57.8%
if -1.8500000000000001e-6 < b < 0.00239999999999999979Initial program 98.8%
associate-*r/98.9%
*-commutative98.9%
+-commutative98.9%
Simplified98.9%
Taylor expanded in b around 0 98.9%
if 0.00239999999999999979 < b Initial program 51.8%
associate-/l*51.9%
+-commutative51.9%
Simplified51.9%
Taylor expanded in a around 0 51.5%
Final simplification74.7%
(FPCore (r a b) :precision binary64 (* (sin b) (/ r (cos (+ b a)))))
double code(double r, double a, double b) {
return sin(b) * (r / cos((b + a)));
}
real(8) function code(r, a, b)
real(8), intent (in) :: r
real(8), intent (in) :: a
real(8), intent (in) :: b
code = sin(b) * (r / cos((b + a)))
end function
public static double code(double r, double a, double b) {
return Math.sin(b) * (r / Math.cos((b + a)));
}
def code(r, a, b): return math.sin(b) * (r / math.cos((b + a)))
function code(r, a, b) return Float64(sin(b) * Float64(r / cos(Float64(b + a)))) end
function tmp = code(r, a, b) tmp = sin(b) * (r / cos((b + a))); end
code[r_, a_, b_] := N[(N[Sin[b], $MachinePrecision] * N[(r / N[Cos[N[(b + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin b \cdot \frac{r}{\cos \left(b + a\right)}
\end{array}
Initial program 74.6%
associate-/l*74.6%
+-commutative74.6%
Simplified74.6%
associate-/r/74.3%
Applied egg-rr74.3%
Final simplification74.3%
(FPCore (r a b) :precision binary64 (* r (/ (sin b) (cos (+ b a)))))
double code(double r, double a, double b) {
return r * (sin(b) / cos((b + a)));
}
real(8) function code(r, a, b)
real(8), intent (in) :: r
real(8), intent (in) :: a
real(8), intent (in) :: b
code = r * (sin(b) / cos((b + a)))
end function
public static double code(double r, double a, double b) {
return r * (Math.sin(b) / Math.cos((b + a)));
}
def code(r, a, b): return r * (math.sin(b) / math.cos((b + a)))
function code(r, a, b) return Float64(r * Float64(sin(b) / cos(Float64(b + a)))) end
function tmp = code(r, a, b) tmp = r * (sin(b) / cos((b + a))); end
code[r_, a_, b_] := N[(r * N[(N[Sin[b], $MachinePrecision] / N[Cos[N[(b + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
r \cdot \frac{\sin b}{\cos \left(b + a\right)}
\end{array}
Initial program 74.6%
associate-*r/74.6%
*-commutative74.6%
+-commutative74.6%
Simplified74.6%
Final simplification74.6%
(FPCore (r a b) :precision binary64 (if (or (<= b -1.42e-5) (not (<= b 0.0024))) (* r (tan b)) (* r (/ b (cos a)))))
double code(double r, double a, double b) {
double tmp;
if ((b <= -1.42e-5) || !(b <= 0.0024)) {
tmp = r * tan(b);
} else {
tmp = r * (b / cos(a));
}
return tmp;
}
real(8) function code(r, a, b)
real(8), intent (in) :: r
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.42d-5)) .or. (.not. (b <= 0.0024d0))) then
tmp = r * tan(b)
else
tmp = r * (b / cos(a))
end if
code = tmp
end function
public static double code(double r, double a, double b) {
double tmp;
if ((b <= -1.42e-5) || !(b <= 0.0024)) {
tmp = r * Math.tan(b);
} else {
tmp = r * (b / Math.cos(a));
}
return tmp;
}
def code(r, a, b): tmp = 0 if (b <= -1.42e-5) or not (b <= 0.0024): tmp = r * math.tan(b) else: tmp = r * (b / math.cos(a)) return tmp
function code(r, a, b) tmp = 0.0 if ((b <= -1.42e-5) || !(b <= 0.0024)) tmp = Float64(r * tan(b)); else tmp = Float64(r * Float64(b / cos(a))); end return tmp end
function tmp_2 = code(r, a, b) tmp = 0.0; if ((b <= -1.42e-5) || ~((b <= 0.0024))) tmp = r * tan(b); else tmp = r * (b / cos(a)); end tmp_2 = tmp; end
code[r_, a_, b_] := If[Or[LessEqual[b, -1.42e-5], N[Not[LessEqual[b, 0.0024]], $MachinePrecision]], N[(r * N[Tan[b], $MachinePrecision]), $MachinePrecision], N[(r * N[(b / N[Cos[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.42 \cdot 10^{-5} \lor \neg \left(b \leq 0.0024\right):\\
\;\;\;\;r \cdot \tan b\\
\mathbf{else}:\\
\;\;\;\;r \cdot \frac{b}{\cos a}\\
\end{array}
\end{array}
if b < -1.42e-5 or 0.00239999999999999979 < b Initial program 54.2%
associate-/l*54.3%
+-commutative54.3%
Simplified54.3%
Taylor expanded in a around 0 54.4%
expm1-log1p-u40.5%
expm1-udef17.2%
clear-num17.2%
quot-tan17.2%
Applied egg-rr17.2%
expm1-def40.5%
expm1-log1p54.4%
associate-/r/54.4%
/-rgt-identity54.4%
Simplified54.4%
if -1.42e-5 < b < 0.00239999999999999979Initial program 98.8%
associate-*r/98.9%
*-commutative98.9%
+-commutative98.9%
Simplified98.9%
Taylor expanded in b around 0 98.9%
Final simplification74.7%
(FPCore (r a b) :precision binary64 (* r (tan b)))
double code(double r, double a, double b) {
return r * tan(b);
}
real(8) function code(r, a, b)
real(8), intent (in) :: r
real(8), intent (in) :: a
real(8), intent (in) :: b
code = r * tan(b)
end function
public static double code(double r, double a, double b) {
return r * Math.tan(b);
}
def code(r, a, b): return r * math.tan(b)
function code(r, a, b) return Float64(r * tan(b)) end
function tmp = code(r, a, b) tmp = r * tan(b); end
code[r_, a_, b_] := N[(r * N[Tan[b], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
r \cdot \tan b
\end{array}
Initial program 74.6%
associate-/l*74.6%
+-commutative74.6%
Simplified74.6%
Taylor expanded in a around 0 61.1%
expm1-log1p-u49.0%
expm1-udef23.3%
clear-num23.3%
quot-tan23.3%
Applied egg-rr23.3%
expm1-def49.0%
expm1-log1p61.1%
associate-/r/61.2%
/-rgt-identity61.2%
Simplified61.2%
Final simplification61.2%
(FPCore (r a b) :precision binary64 (/ r (+ (* b -0.3333333333333333) (/ 1.0 b))))
double code(double r, double a, double b) {
return r / ((b * -0.3333333333333333) + (1.0 / b));
}
real(8) function code(r, a, b)
real(8), intent (in) :: r
real(8), intent (in) :: a
real(8), intent (in) :: b
code = r / ((b * (-0.3333333333333333d0)) + (1.0d0 / b))
end function
public static double code(double r, double a, double b) {
return r / ((b * -0.3333333333333333) + (1.0 / b));
}
def code(r, a, b): return r / ((b * -0.3333333333333333) + (1.0 / b))
function code(r, a, b) return Float64(r / Float64(Float64(b * -0.3333333333333333) + Float64(1.0 / b))) end
function tmp = code(r, a, b) tmp = r / ((b * -0.3333333333333333) + (1.0 / b)); end
code[r_, a_, b_] := N[(r / N[(N[(b * -0.3333333333333333), $MachinePrecision] + N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{r}{b \cdot -0.3333333333333333 + \frac{1}{b}}
\end{array}
Initial program 74.6%
associate-/l*74.6%
+-commutative74.6%
Simplified74.6%
Taylor expanded in b around 0 48.7%
fma-def48.7%
distribute-rgt-out--48.7%
metadata-eval48.7%
neg-mul-148.7%
+-commutative48.7%
unsub-neg48.7%
Simplified48.7%
Taylor expanded in a around 0 34.5%
Final simplification34.5%
(FPCore (r a b) :precision binary64 (* r b))
double code(double r, double a, double b) {
return r * b;
}
real(8) function code(r, a, b)
real(8), intent (in) :: r
real(8), intent (in) :: a
real(8), intent (in) :: b
code = r * b
end function
public static double code(double r, double a, double b) {
return r * b;
}
def code(r, a, b): return r * b
function code(r, a, b) return Float64(r * b) end
function tmp = code(r, a, b) tmp = r * b; end
code[r_, a_, b_] := N[(r * b), $MachinePrecision]
\begin{array}{l}
\\
r \cdot b
\end{array}
Initial program 74.6%
associate-*r/74.6%
*-commutative74.6%
+-commutative74.6%
Simplified74.6%
Taylor expanded in b around 0 47.7%
Taylor expanded in a around 0 34.2%
Final simplification34.2%
herbie shell --seed 2023240
(FPCore (r a b)
:name "rsin A (should all be same)"
:precision binary64
(/ (* r (sin b)) (cos (+ a b))))