• Create Account

### #ActualAardvajk

Posted 02 August 2012 - 02:00 AM

The vast majority of the warnings come from initialization and simple arithmetic.

Well then it seems highly unlikely you need to worry about loss of precision when converting from float to double, unless your simple arithmetic involves numbers like 23423.4234234098029384233409583405

Incidentally, if you've already defined an alias for the type, there is no need for a further macro for the cast, given C++'s constructor cast syntax:

typedef float real; // or double

real x = real(23.0);


is quite sufficient.

### #1Aardvajk

Posted 02 August 2012 - 01:59 AM

The vast majority of the warnings come from initialization and simple arithmetic.

Well then it seems highly unlikely you need to worry about loss of precision when converting from float to double, unless your simple arithmetic involves numbers like 23423.4234234098029384233409583405

Incidentally, if you've already defined an alias for the type, there is no need for a further macro for the cast, given C++'s constructor cast syntax:

typedef real float; // or double

real x = real(23.0);


is quite sufficient.

PARTNERS