Skip to content
Curiousish
  • How to’s
  • Scripts
  • JavaScript
  • AWS
  • Gallery
  • Misc
  • System Status

How to Groovy: Decimal Accuracy

Posted on 15/05/202111/05/2021by justCurious

Loooong numbers can be added in Groovy!

Copy Code Copied Use a different Browser

class GroovyTut {
static void main(String[] args) {

  println("Hello World"); 
    
  // Decimal Accuracy
  println("1.9876543210 + 1.9876543210 = "
  + (1.9876543210 + 1.9876543210));

 
    }
}

Categories ScriptsTags groovy

Post navigation

Previous Post How to Groovy: Integer, Float, Double MIN and MAX Value
Next PostHow to Groovy: Functions de Math

Tags

  • AHK (1)
  • AWS (32)
  • azure (1)
  • bash (2)
  • C# (1)
  • chrome (1)
  • cloud (6)
  • CMD (1)
  • concepts (1)
  • CSS (1)
  • developer (1)
  • docker (3)
  • EC2 (1)
  • ffmpeg (2)
  • GCP (1)
  • Git (7)
  • groovy (9)
  • Guides (1)
  • HTML (3)
  • JavaScript (5)
  • JavaScript Project (1)
  • kubernetes (1)
  • Linux (7)
  • mac (5)
  • Media (1)
  • Powershell (8)
  • SysOps (2)
  • utilities (2)
  • Visual Studio (1)
  • Windows (1)
  • XML (1)
  • Youtube (1)

Uptime Check

  • How to’s
  • Scripts
  • JavaScript
  • AWS
  • Gallery
  • Misc
  • System Status

Quote of the month

Pareto Principle – You’ll learn the 20% of the things that you’ll need to do 80% of the time, when writing a program in C#.

Uptime Check

Copyright © 2021 Curiousish