(FPCore (a b angle) :precision binary64 (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0)))) (cos (* PI (/ angle 180.0)))))
(FPCore (a b angle)
:precision binary64
(*
(sin (* angle (* PI 0.005555555555555556)))
(*
(* -2.0 (- (* a a) (* b b)))
(sqrt
(pow
(pow
(cbrt (pow (cbrt (cos (* PI (* angle 0.005555555555555556)))) 3.0))
3.0)
2.0)))))double code(double a, double b, double angle) {
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin((((double) M_PI) * (angle / 180.0)))) * cos((((double) M_PI) * (angle / 180.0)));
}
double code(double a, double b, double angle) {
return sin((angle * (((double) M_PI) * 0.005555555555555556))) * ((-2.0 * ((a * a) - (b * b))) * sqrt(pow(pow(cbrt(pow(cbrt(cos((((double) M_PI) * (angle * 0.005555555555555556)))), 3.0)), 3.0), 2.0)));
}
public static double code(double a, double b, double angle) {
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin((Math.PI * (angle / 180.0)))) * Math.cos((Math.PI * (angle / 180.0)));
}
public static double code(double a, double b, double angle) {
return Math.sin((angle * (Math.PI * 0.005555555555555556))) * ((-2.0 * ((a * a) - (b * b))) * Math.sqrt(Math.pow(Math.pow(Math.cbrt(Math.pow(Math.cbrt(Math.cos((Math.PI * (angle * 0.005555555555555556)))), 3.0)), 3.0), 2.0)));
}
function code(a, b, angle) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(Float64(pi * Float64(angle / 180.0)))) * cos(Float64(pi * Float64(angle / 180.0)))) end
function code(a, b, angle) return Float64(sin(Float64(angle * Float64(pi * 0.005555555555555556))) * Float64(Float64(-2.0 * Float64(Float64(a * a) - Float64(b * b))) * sqrt(((cbrt((cbrt(cos(Float64(pi * Float64(angle * 0.005555555555555556)))) ^ 3.0)) ^ 3.0) ^ 2.0)))) end
code[a_, b_, angle_] := N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[a_, b_, angle_] := N[(N[Sin[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(-2.0 * N[(N[(a * a), $MachinePrecision] - N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Power[N[Power[N[Power[N[Power[N[Power[N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)
\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(\left(-2 \cdot \left(a \cdot a - b \cdot b\right)\right) \cdot \sqrt{{\left({\left(\sqrt[3]{{\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}}\right)}^{3}\right)}^{2}}\right)



Bits error versus a



Bits error versus b



Bits error versus angle
Results
Initial program 31.3
Simplified31.3
Applied egg-rr31.6
Taylor expanded in angle around inf 31.6
Simplified31.5
Applied egg-rr31.6
Applied egg-rr31.5
Final simplification31.5
herbie shell --seed 2022155
(FPCore (a b angle)
:name "ab-angle->ABCF B"
:precision binary64
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0)))) (cos (* PI (/ angle 180.0)))))