This coding exercise walks through how to accurately multiple large decimals and examines how a potentially dangerous bug can slip into a codebase.
Build a method that accurately multiples two large decimals in Ruby.
Given the following decimals:
Build a method that accurately multiples the values.
Real World Usage
This is a tricky Ruby coding interview question because the problem looks incredibly simple. However, in order to work with large decimals in Ruby, you’ll discover that you need to implement a number of mechanisms in order to accurately generate the correct answer. Additionally, accurately calculating decimal values is vital in a wide variety of applications, especially financial and scientific programs.
Can be found on the solutions branch on github.