タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

javaとdecimalに関するcu39のブックマーク (3)

  • BigDecimal vs. Double: Precision for Financial Accuracy

    In the realm of financial calculations, precision is paramount. The choice between BigDecimal and Double data types can significantly impact the accuracy of your results. In this comprehensive guide, we will delve into the key differences, use cases, advantages, and drawbacks of these two data types. By the end, you’ll have a clear understanding of when to employ each for your financial computatio

    BigDecimal vs. Double: Precision for Financial Accuracy
  • 二進化十進表現 - Wikipedia

    例えば、127 という整数値は、 0001、0010、0111 という3つのBCDで表される。 二進化十進数には、ゾーン形式とパック形式があり、用途に応じて使い分けられる。 符号部を持たないパック形式では、ファイルなどの中の二進化十進数値を十六進法で表示すると十進と同じように表示される。例えば、十六進で「1234」と表示されるデータは、整数値 1234 のことである。また、機種や文字コードに依存するものの、一般にゾーン形式では8ビット文字表示すると十進と同じように表示される。ただし、符号部を持つ場合も多く、上記の表示が必ずしもわかりやすいとは言えないこともある。 簡単な利用法としては、電子回路上で、0 - 9を表示可能なBCD対応の数字表示素子1つに対してBCDの4桁を4の入力信号として直接入力する、等の使われ方がある。二進法で扱う場合と違い、表示素子に入力する前の変換が要らずデータバス

  • What to do with Java BigDecimal performance?

    I write currency trading applications for living, so I have to work with monetary values (it's a shame that Java still doesn't have decimal float type and has nothing to support arbitrary-precision monetary calculations). "Use BigDecimal!" — you might say. I do. But now I have some code where performance is an issue, and BigDecimal is more than 1000 times (!) slower than double primitives. The cal

    What to do with Java BigDecimal performance?
  • 1