Floating Point Arithmetic Flashcards

(25 cards)

1
Q

Why is floating point arithmetic importent?

A

We need to be able to handle very small and very large numbers and need a representation where the decimal point can move.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is a floating-point number represented?

A

The floating point representation has a base and a precision. It takes the form:

d.dddd x b^e

Where d.dddd is the significand (mantissa) which has p digits. and e is the exponent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is IEEE 754?

A

It is the most widely adopted standard for floating-point arithmetic. The standard specifies number representations as well as how operations should behave.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is double precision?

A

Double precision is a representation of a floating point number using 64 bits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why is double precision used?

A

Floating point numbers are an approximation of the actual number and have a finite accuracy and finite range. Because of the range and accuracy needed for scientific and engineering calculations double precision is used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How are the 64 bits of double precision split?

A

52 bits for the mantissa, 11bits for the exponent, 1 bit for the sign

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a normalised floating point number?

A

A floating point number that has an exponent that is neither all zeros or all ones.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the smallest normalised numbers structure?

A

All mantissa bits are 0, all exponent bits are 0 except the last.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the largest normalised number structure?

A

all mantissa bits are 1 and all exponent bits are 1 except the last

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the machine epsilon?

A

The difference between 1 and the next largest representable floating point number.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is round off error?

A

The error introduced from the difference between the floating point approximation and the actual number represented.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does it mean for a solution to be machine precise?

A

If the error from the numerical method is smaller than the error from the floating point representation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an exceptional value?

A

If the exponent bits of a floating point number are all 1’s or all 0’s.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a subnormal floating-point number?

A

A number with all the exponent bits as 0s.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why are subnormal numbers sometimes used?

A

They expand the range around 0 and allow for more gradual underflow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How are infinities and NaNs represented?

A
  1. inf - all exponent bits are 1s, all mantissa bits are 0s
  2. -inf - all exponent bits are 1s, all mantissa bits are 0s, sign bit is 1
  3. NaN - all exponent bits are 1s and not all mantissa bits are 0
17
Q

What are the 5 floating point exception types?

A
  1. Overflow
  2. Underflow
  3. Divide by zero
  4. Invalid
  5. Inexact
18
Q

How can exceptions be handled?

A

Floating point errors set a flag in the hardware and can be trapped for debugging.

19
Q

What is peak performance?

A

The theoretical maximum performance of a system

20
Q

What are the 4 main areas performance depends on?

A
  1. The number of sockets
  2. The number of processor cores per socket
  3. The clock frequency
  4. The number of operations per cycle
21
Q

Which two techniques allow for multiple clock operations per cycle?

A
  1. vector instructions
  2. fused multiply-add
22
Q

How is node peak performance caluclated?

A

Rpeak = Sockets X CoresPerSockets X Clock X OperationsPerCycle

23
Q

How is cluster peak performance calculated?

A

Multiple node peak performance (Rpeak) by the number of compute nodes

24
Q

What can influence the number of floating point instructions per cycle?

A
  1. The instruction set
  2. Precision
25