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) {
double tmp;
if ((angle / 180.0) <= 5e+65) {
tmp = 2.0 * ((b - a) * (cos((0.005555555555555556 * (angle * cbrt(exp((log(((double) M_PI)) * 3.0)))))) * (sin((0.005555555555555556 * (angle * ((double) M_PI)))) * (b + a))));
} else {
tmp = (2.0 * ((b - a) * (b + a))) * (pow(cbrt(sin(((cbrt(((double) M_PI)) * (cbrt(((double) M_PI)) * cbrt(((double) M_PI)))) * (angle * 0.005555555555555556)))), 3.0) * cos(((angle / 180.0) * ((double) M_PI))));
}
return tmp;
}
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) {
double tmp;
if ((angle / 180.0) <= 5e+65) {
tmp = 2.0 * ((b - a) * (Math.cos((0.005555555555555556 * (angle * Math.cbrt(Math.exp((Math.log(Math.PI) * 3.0)))))) * (Math.sin((0.005555555555555556 * (angle * Math.PI))) * (b + a))));
} else {
tmp = (2.0 * ((b - a) * (b + a))) * (Math.pow(Math.cbrt(Math.sin(((Math.cbrt(Math.PI) * (Math.cbrt(Math.PI) * Math.cbrt(Math.PI))) * (angle * 0.005555555555555556)))), 3.0) * Math.cos(((angle / 180.0) * Math.PI)));
}
return tmp;
}
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)
tmp = 0.0
if (Float64(angle / 180.0) <= 5e+65)
tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(cos(Float64(0.005555555555555556 * Float64(angle * cbrt(exp(Float64(log(pi) * 3.0)))))) * Float64(sin(Float64(0.005555555555555556 * Float64(angle * pi))) * Float64(b + a)))));
else
tmp = Float64(Float64(2.0 * Float64(Float64(b - a) * Float64(b + a))) * Float64((cbrt(sin(Float64(Float64(cbrt(pi) * Float64(cbrt(pi) * cbrt(pi))) * Float64(angle * 0.005555555555555556)))) ^ 3.0) * cos(Float64(Float64(angle / 180.0) * pi))));
end
return tmp
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_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+65], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[Exp[N[(N[Log[Pi], $MachinePrecision] * 3.0), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Power[N[Sin[N[(N[(N[Power[Pi, 1/3], $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[Pi, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision] * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]