Skip to content

2018-2: Number Splitting

Write an APL function that, given a scalar real non-negative number, will return a two-element vector of the integer and fractional parts of the number.

Examples:

     (your_function) 1.234
1 0.234
     (your_function) 12
12 0
     (your_function) .1234
0 0.1234
     (your_function) 0
0 0
your_function ←

Solutions

Video Thumbnail YouTube

Chat transcript Code on GitHub