#Multiply Bigdecimals fully

1 messages · Page 1 of 1 (latest)

rough zincBOT
#

<@&987246746478460948> please have a look, thanks.

rough zincBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

forest flint
#

that number is really small, not really large

candid inlet
#

you know hwat E-7 means?

real cave
#

E-7 means *10^-7

forest flint
#

use .toPlainString()

real cave
#

"%.7f".formatted(theBigDecimal)
or
String.format("%.7f", theBigDecimal)

forest flint
#
jshell> b.round(new MathContext(7, RoundingMode.FLOOR)).toPlainString()
$13 ==> "0.00000000001234567"

jshell> b.round(new MathContext(3, RoundingMode.FLOOR)).toPlainString()
$14 ==> "0.0000000000123"
real cave
forest flint
real cave
#

ah and what I gave was if you want to round 7 places after the dot @pale drift

rough zincBOT
#

Closed the thread.

real cave
forest flint
#

oh cool

#

yeah still prefer .round, but neat that that works

rough zincBOT
#

Closed the thread.

rose pendant
forest flint
#

-_-

rose pendant
#

just trying to stop bugs from creeping in