search

Home  >  Q&A  >  body text

java - float或double转换为int时的精度问题,如何避免?

巴扎黑巴扎黑2911 days ago443

reply all(2)I'll reply

  • 迷茫

    迷茫2017-04-18 10:41:55

    Use BigDecimal to handle related problems. BigDecimal can handle numbers with arbitrary precision. Related articles:
    http://www.opentaps.org/docs/...

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 10:41:55

    Unavoidable

    Don’t use floating point numbers when exact decimal numbers are required

    reply
    0
  • Cancelreply