Go for Decimals

Tags: decimal, floating point, fixed precision, IEEE 754R

Joshua Carpeggiani Software Engineer, ANZ joshua.carpeggiani@anz.com

Floating point numbers

.image code/first_example.png 258 _

Floating point numbers

.image code/first_example.png 258 _

.image code/first_ans1.png _ 300

Floating point numbers

.image code/second.png 400 _

Floating point numbers

.image code/second.png 400 _
.image code/second_ans.png _ 500

41 seconds going at 5 times the speed of sound is long enough to travel 71 kms

Not all numbering systems are created equal

Binary

Binary

Binary

Binary

Binary

Binary

Binary

Binary

Binary floating point numbers

Binary

Binary

Binary

Binary

Why?

Another Decimal library

http://www.github.com/anz-bank/decimal

  • Project Goal: Implement a 64 & 128 bit decimal floating point library
  • Conform as closely to IEEE 754-2008 standard as practical

Scientific notation

Scientific notation

Scientific notation

Scientific notation

Scientific notation

Scientific notation

Another Decimal library

Another Decimal library

Another Decimal library

Another Decimal library

Applause

Applause

The End?

The End?

  • Use decimals for everything?

The End?

  • Use decimals for everything?
  • Why doesn’t everything use this?

The End?

  • Use decimals for everything?
  • Why doesn’t everything use this?
  • Are decimals even that efficient?
: IBM research; out of a survey in 2007 of enterprise databases;
55% of numeric data was decimal

Decimal decoding

Decimal decoding

Decimal decoding

Decimal decoding

Decimal decoding

Decimal decoding

Decimal decoding

Decimal decoding

Binary decoding

Binary decoding

Binary decoding

Decimal vs Floating point

Software vs Hardware

TAKE A BREAK

Binary floating point Add