Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
live-coding-fr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
twitch
live-coding-fr
Merge requests
!79
Resolve "Java puzzle code"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Java puzzle code"
104-java-puzzle-code
into
master
Overview
0
Commits
2
Pipelines
0
Changes
11
Merged
Colin DAMON
requested to merge
104-java-puzzle-code
into
master
3 years ago
Overview
0
Commits
2
Pipelines
0
Changes
11
Expand
Closes
#104 (closed)
Edited
3 years ago
by
Colin DAMON
0
0
Merge request reports
Viewing commit
f7698857
Show latest version
11 files
+
304
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
11
Search (e.g. *.vue) (Ctrl+P)
f7698857
/bin/bash: q : commande introuvable
· f7698857
Colin DAMON
authored
3 years ago
java-puzzles/src/test/java/fr/ippon/PlayingWithBigDecimal.java
0 → 100644
+
18
−
0
Options
package
fr.ippon
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.*;
import
java.math.BigDecimal
;
import
org.junit.jupiter.api.Test
;
public
class
PlayingWithBigDecimal
{
@Test
public
void
roundingSubstract
()
{
BigDecimal
a
=
new
BigDecimal
(
2.00
);
BigDecimal
b
=
new
BigDecimal
(
0.99
);
// assertThat(a.subtract(b).toString()).isEqualTo("1");
// assertThat(a.subtract(b).toString()).isEqualTo("1.01");
// assertThat(a.subtract(b).toString()).isEqualTo("1.0100000000000000088817841970012523233890533447265625");
}
}
Loading