3 kyu
Divide numbers as strings
183 of 205osofem
Description:
Divide numbers as strings
- Input can be integer, negative, zero, or decimal in string format.
- Input may be very large.
- Input won't have leading or trailing zeroes.
- Result should be returned as strings without leading or trailing zeroes.
- Recurring results should be to 20 decimal places. i.e.
1/3
should return0.33333333333333333333
. Just stop computing when your result gets to 20 decimal places. (i.e. no need to compute to 21 decimal places and round to 20 decimal places). - If divisor is zero, throw
Error
(Exception
in PHP). 0.00000000000000000000
is just0
.
You may first attempt Voile's Divide integers as strings as an appetizer.
Note: bignumber.js
is not allowed and your code length should be less than or equal to 6000 symbols.
Mathematics
Big Integers
Fundamentals
Similar Kata:
Stats:
Created | Aug 11, 2017 |
Published | Aug 16, 2017 |
Warriors Trained | 2614 |
Total Skips | 533 |
Total Code Submissions | 6581 |
Total Times Completed | 205 |
JavaScript Completions | 183 |
PHP Completions | 23 |
Total Stars | 107 |
% of votes with a positive feedback rating | 85% of 53 |
Total "Very Satisfied" Votes | 41 |
Total "Somewhat Satisfied" Votes | 8 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 4 |
Average Assessed Rank | 3 kyu |
Highest Assessed Rank | 3 kyu |
Lowest Assessed Rank | 4 kyu |