Hey everyone. I'm new here so please excuse me if I'm posting this in the wrong place. I was wondering if there was an "approximately equal to" operator in C++. Or is there a pre-existing function available for it already? I was trying to find the square root of a number without using the "sqrt" function. The problem arises when the number input has no round number as it's square root, e.g., 10.
No there isn't, and the reason is simply that there is no absolute definition what "approximately" really means.
If you're trying to find ways of obtaining rough roots more quickly than with sqrt() I suggest you look up some assembler codes that you can find online, some are several times quicker than the math.h sqrt() function, albeit less accurate.