Hi!
This application is probably very common for some people, but it is the very first time I really needed high precision computation (BigInt
and BigFloat
).
I am implementing an algorithm for designing frozen orbits in SatelliteAnalysis.jl (https://github.com/JuliaSpace/SatelliteAnalysis.jl/blob/main/src/frozen_orbits.jl) and to obtain the frozen eccentricity we need to compute this function:
The problem is when you try using very high degrees, leading to 300! and so on. I was thinking how I could possible handle this problem, like interactively computing the terms using a nice βguessβ to always divide things to reach lower numbers.
However, it turns out that just using BigInt
and BigFloat
, setting setprecision
accordingly, everything just works out-of-the-box without requiring too much thinking, Hence, I could write:
k_t = factorial(2lb - 2tb) / (
factorial(tb) *
factorial(lb - tb) *
factorial(pb - tb) *
factorial(lb - pb - tb) *
big(2)^(2lb - 2tb)
)
which is exactly the same equation as I needed.
Conclusion: I implemented everything is very small time, which was awesome!
After all these years, I still find amazing things that Julia does extremely well. Thanks, all the devs!