|
|
|
|
3650000.000000 + 0.000123 == 3650000.000123 365000000.00000000 + 0.00000123 == 365000000.00000123 36500000000.0000000000 + 0.0000000123 == 36500000000.0000000123 3650000000000.000000000000 + 0.000000000123 == 3650000000000.000000000123 365000000000000.00000000000000 + 0.00000000000123 == 365000000000000.00000000000123 36500000000000000.0000000000000000 + 0.0000000000000123 == 36500000000000000.0000000000000123 3650000000000000000.000000000000000000 + 0.000000000000000123 == 3650000000000000000.000000000000000123 365000000000000000000.00000000000000000000 + 0.00000000000000000123 == 365000000000000000000.00000000000000000123 36500000000000000000000.0000000000000000000000 + 0.0000000000000000000123 == 36500000000000000000000.0000000000000000000123 3650000000000000000000000.000000000000000000000000 + 0.000000000000000000000123 == 3650000000000000000000000.000000000000000000000123 |
Most of these are available through 3rd party libraries. Either boost or others. |
> Do we need regex, chrono, ranges... if there are good libraries there? |
Would you find a 3rd party lib on say github and just install and use it??? Some libs only compile easily with a posix compiler (not VS). |
open VS Developer command prompt using appropriate developer command prompt this is very crucial!!!!!!!!! navigate to the boost root: cd D:\Programming\boost_1_78_0 (or latest) +------------------------------------------------------------------------------------+ For Visual Studio 2019: bootstrap vc142 b2 --stagedir=vc142 -a The following directory should be added to compiler include paths: D:\Programming\boost_1_78_0 (or latest) The following directory should be added to linker library paths: D:\Programming\boost_1_78_0\vc142\lib (or latest) +------------------------------------------------------------------------------------+ For Visual Studio 2022: bootstrap vc143 b2 --stagedir=vc143 -a The following directory should be added to compiler include paths: D:\Programming\boost_1_78_0 (or latest) The following directory should be added to linker library paths: D:\Programming\boost_1_78_0\vc143\lib (or latest) +------------------------------------------------------------------------------------+ To add Boost to the default header search: http://www.cplusplus.com/forum/lounge/271176/#msg1169093 (I really, really, REALLY recommend doing this) |
We aim to establish "existing practice" and provide reference implementations so that Boost libraries are suitable for eventual standardization. |
The precision and range of values aren’t prescribed by the C++ standard, so what you get with each type depends on your compiler. And this, in turn, will depend on what kind of processor is used by your computer and the floating-point representation it uses. The standard does guarantee that type long double will provide a precision that’s no less than that of type double, and type double will provide a precision that is no less than that of type float. |
using rep_type = cpp_int_backend<...>;
|
|
Looks like the C++ standard does not guarantee even the HIGHER precision that is given to you |
In this day & age I just don't buy that we should even be questioning the need and desire to have larger floating point precisions. |
Mr Z wrote: |
---|
long double f2 = 1.23E-4; |
|
|
0.0001230000000000000081983031474663903281907550990581512451171875 0.0001230000000000000000059063607412042362643234127972391434013843536376953125 |
0.0001230000000000000081983031474663903281907550990581512451171875 0.0001230000000000000081983031474663903281907550990581512451171875 |