반응형
250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- codebuild
- bootstrap
- redis
- SQL
- chartjs
- Airflow
- PostgreSQL
- java bigdecimal
- node
- 도커
- kubeflow
- COALESCE
- Jenkins
- Kafka
- codepipeline
- Spring
- AWS CI/CD 구축하기
- Spring Error
- docker
- codedeploy error
- or some instances in your deployment group are experiencing problems.
- codedeploy
- aws cicd
- IntelliJ
- aws
- chart.js
- JavaScript
- Python
- VPN
- Flux
Archives
- Today
- Total
Small Asteroid Blog
[java] BigDecimal error : Non-terminating decimal expansion; no exact representable decimal result. 본문
백엔드/Spring
[java] BigDecimal error : Non-terminating decimal expansion; no exact representable decimal result.
작은소행성☄️ 2022. 5. 15. 15:09728x90
java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result
아무리 BigDecimal이라고 해도 제한없는 숫자를 다룰 수는 없는 것이다.
divide시 자리수와 결과셋을 지정해줘야 한다.
bigDecimal.divide(bd, 2, BigDecimal.ROUND_CEILING);
728x90
반응형
'백엔드 > Spring' 카테고리의 다른 글
[JPA] 최범균님 <JPA 기초> 내용 정리하기 (0) | 2022.09.07 |
---|---|
[java] BigDecimal 사칙연산(더하기, 빼기, 나누기, 곱하기), 비교(compareTo) (0) | 2022.05.16 |
Connection Factory (0) | 2022.05.13 |
Reactive Streams (0) | 2022.04.16 |
[webflux] PublishOn, SubscribeOn (0) | 2022.04.15 |