Scala Program to Calculate the Ieee Remainder of Given Numbers Using Scala.math.ieeeremainder() Function

You are currently viewing Scala Program to Calculate the Ieee Remainder of Given Numbers Using Scala.math.ieeeremainder() Function

Scala program to calculate the IEEE remainder of given numbers using scala.math.IEEEremainder() function

// Scala program to calculate the IEEE remainder 
// of given numbers

object Sample{  
    def main(args:Array[String]){  
        var num1:Double    = 0;
        var num2:Double    = 0;
        var res:Double = 0;
           
        print("Enter number1: ")
        num1=scala.io.StdIn.readDouble()

        print("Enter number2: ")
        num2=scala.io.StdIn.readDouble()
        
        res= scala.math.IEEEremainder(num1,num2)
        println("IEEEremainder is: "+res);
    }  
}
Enter number1: 23.2
Enter number2: 10.0
IEEEremainder is: 3.1999999999999993

Ranjith

Hi, I'm Manoj a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply