I've created a simple arithmetic program involving logs and exp, but I cant get really huge number (bigger 10^300).
Using long double
, my program says infinity, but I've been asked to try to get a closer approximation than "infinity". I think that IEEE 754 would be fine, but I don't know which format I'm using right now or how to switch to IEEE 754.
You may use some arbitrary precision library such as https://gmplib.org/
You also may try to find out if your compiler supports some non standard larger double type like gcc's
__float128
. But these solutions are obviously not portable.