Download presentation

Presentation is loading. Please wait.

Published byTaylor Gash Modified over 3 years ago

1
Evaluating the floating point in Java Virtual Machine Bruno José Torres Fernandes Renato Viana Ferreira Marcília Andrade Campos {bjtf, rvf, mac}@cin.ufpe.br

2
Motivation Analysis of floating precision error in the Java programming language. Analysis of floating precision error in the Java programming language. Rounding modes implementation. Rounding modes implementation. Interval type implementantion to control errors in scientific computation. Interval type implementantion to control errors in scientific computation.

3
Representing floating points numbers The Java programming language offers two primitive types, float and double, and the wrapper classes Float and Double from the java.lang package. Double representation: Size(bits)Exp(bits)Mant. ( bits) Sign 6410531

4
Double Precision The double primitive type supports 16 decimal digits but it only offers correctness for the 14 most significant digits. The double primitive type supports 16 decimal digits but it only offers correctness for the 14 most significant digits. For scientific computation, which needs high precision, this error margin is not acceptable, for it can cause wrong results. For scientific computation, which needs high precision, this error margin is not acceptable, for it can cause wrong results.

5
Examples...

6
Alternatives Floating point is by nature inexact, but the Java Virtual Machine offers the BigDecimal class from the package java.math that offers perfect precision storing the floating value as two integers, the unscaled value as an integer and a non- negative 32-bit integer scale, which represents the number of digits to the right of the decimal point. Floating point is by nature inexact, but the Java Virtual Machine offers the BigDecimal class from the package java.math that offers perfect precision storing the floating value as two integers, the unscaled value as an integer and a non- negative 32-bit integer scale, which represents the number of digits to the right of the decimal point.

7
Purpose of the project Implement double rounding modes; Implement double rounding modes; Implement Interval type in Java and operations over the type; Implement Interval type in Java and operations over the type; Build Java-XSC API. Build Java-XSC API.

8
Questions...

Similar presentations

OK

Computer Science 210 Computer Organization Floating Point Representation.

Computer Science 210 Computer Organization Floating Point Representation.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on recurrent abortion Ppt on p&g products india Ppt on law against child marriage bangladesh Ppt on bond length definition Ppt on sbi life insurance Ppt on natural numbers 0 Ppt on job rotation evaluation Download ppt on transportation and communication Ppt on different types of forests in the united Ppt on point contact diode