Working with Numbers Flashcards

1
Q

Integer Division

A

The result of integer division will drop the remainder

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

Scientific Notation

A

“e” precedes the power-of-10 exponent

  1. 02e23 equals 6.02X10^23
  2. 0e-3 equals 0.001 or 1X10^-3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Floating-point Division

A

If either or both operands in a division expression are floating-point, the result will be floating-point

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

Arithmetic Precedence Rules

A
()
unary-
*, /, %
\+, -
left-to-right
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

cmath

A

Standard math library with C++

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

sqrt

A

Square Root

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

Type Conversion

A

One data type is converted to another
Int-to-double - adds a .0
Double-to-int - drops the fraction

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

Implicit Conversion

A

Automatic conversion
If an operand on either side of an arithmetic operator is a double, then result is a double
During assignments, right side is converted to the left side

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

fabs

A

Absolute Value

fabs(value)

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

Comparing floating-point numbers

A

“Close enough”

fabs(x-y) < 0.0001

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

Epsilon

A

Difference threshold indicating floating-point numbers are equal

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