I'm attempting to program a formula to say how full an horizontal cylinder is with liquid. Here is the formula I am using with variables from measurements I took:
When I use Wolframalpha to solve this I end up getting a complex number, and quite frankly I'm not quite sure what to do with it(link here). I need a real number in cubic inches or gallons to obtain my end goals.
Can someone help me to understand why I a getting a complex number and how I can possibly get a real number? A different formula maybe? This website does the calculations I want, but I have no idea how it does it.