As I understand it, long double in C ++ actually uses hardware architecture (at least for some architectures). Does BigDecimal in Java do enough for small resources?
Does BigDecimal in Java do enough for small resources?
, . , BigDecimal . " ", , BigDecimal, , .
BigDecimal
, BigDecimal , , . , .
, , Java long double, , , , JDK .
long double
. BigDecimal . . , BigDecimal Java.
BigDecimal(BigInteger intVal, long val, int scale, int prec) { this.scale = scale; this.precision = prec; this.intCompact = val; this.intVal = intVal; }
BigDecimal - .
BigDecimal , . IEEE, , .
, , , , BigDecimal . , 1 10 . 1 10 BigDecimal 1, radix 2.
, , . 1/3. BigDecimal , . BigDecimal.
Running tests for each calculation to determine whether the two formats will receive the same answer will disrupt any performance increase when using hardware support.
Source: https://habr.com/ru/post/1652236/More articles:Docker builds pod inside kubernetes, fails with "could not find docker0 bridge" - dockerHow to make vim replacement again until there are no more matches? - vimGoogle App Engine - stack trace information - javaFind rows where one column value matches and the other does not - sqlUsing itertools for an arbitrary number of nested loops of different ranges with dependencies? - pythonError 500 in routing uwsgi - httpConvert row index "% m /% d /% Y" to pandas datetime index - pythonAngular 2 animated transition based on dynamic value instead of time - javascriptsignInWithCustomToken () with native Firebase tokens - firebase-authenticationCall a C ++ function from Python and convert the OpenCV Matrix to a Numpy array - c ++All Articles