首页    期刊浏览 2025年02月17日 星期一
登录注册

文章基本信息

  • 标题:Performance Analysis of BigDecimal Arithmetic Operation in Java
  • 本地全文:下载
  • 作者:Jos Timanta Tarigan ; Elviawaty M. Zamzami ; Cindy Laurent Ginting
  • 期刊名称:Journal of ICT Research and Applications
  • 印刷版ISSN:2337-5787
  • 电子版ISSN:2338-5499
  • 出版年度:2018
  • 卷号:12
  • 期号:3
  • 页码:267-279
  • 语种:English
  • 出版社:Institut Teknologi Bandung
  • 其他摘要:The Java programming language provides binary floating-point primitive data types such as float and double to represent decimal numbers. However, these data types cannot represent decimal numbers with complete accuracy, which may cause precision errors while performing calculations. To achieve better precision, Java provides the BigDecimal class. Unlike float and double, which use approximation, this class is able to represent the exact value of a decimal number. However, it comes with a drawback: BigDecimal is treated as an object and requires additional CPU and memory usage to operate with. In this paper, statistical data are presented of performance impact on using BigDecimal compared to the double data type. As test cases, common mathematical processes were used, such as calculating mean value, sorting, and multiplying matrices.
  • 关键词:BigDecimal arithmetic operation;floating-point arithmetic;numerical programming;optimization;programming language
  • 其他关键词:BigDecimal arithmetic operation;floating-point arithmetic;numerical programming;optimization;programming language
国家哲学社会科学文献中心版权所有