Lesson 8. Big numbers
After reading lesson 8, you’ll be able to
- Save your zero key by specifying an exponent
- Use Go’s big package for really big numbers
- Use big constants and literal values
Computer programming is full of trade-offs. Floating-point types can store numbers of any size, but they lack precision and accuracy at times. Integers are accurate but have a limited range. What if you need a really big, accurate number? This lesson explores two alternatives to the native float64 and int types.
CPUs are optimized for integer and floating-point math, but other numeric representations are possible. When you need to go big, Go has you covered.
What are some situations where integers are too small, floating-point ...