Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are min / max value of floats and doubles?

I already googled and checked limits.h with no results.

I'm hoping there are constants I can refer to hiding somewhere.

like image 604
Bryan Dunphy Avatar asked Dec 11 '22 08:12

Bryan Dunphy


1 Answers

You can use FLT_MIN, FLT_MAX:

NSLog(@"MIN=%f;MAX=%f", FLT_MIN, FLT_MAX);

Output:
MIN=0.000000;MAX=340282346638528859811704183484516925440.000000
like image 159
stosha Avatar answered Jan 13 '23 00:01

stosha