Name That Tune: I Can Code That In One Step

Yes, I believe I made that clear.

Edit: Ah, the name is bad though. Should call it myrem1.

Edit 2: Actually, there is a function in Base, called modf which does basically the same thing, and perhaps should be called remf?

help?> modf

  modf(x)

  Return a tuple (fpart, ipart) of the fractional and integral parts of a number. Both parts have the same sign as the
  argument.

  Examples
  ≡≡≡≡≡≡≡≡≡≡

  julia> modf(3.5)
  (0.5, 3.0)
  
  julia> modf(-3.5)
  (-0.5, -3.0)

Also, it is quite slow:

julia> remf(x) = (a=trunc(x); (x-a, a))
remf (generic function with 1 method)

julia> @btime modf(x) setup=(x=10rand()-5);
  3.193 ns (0 allocations: 0 bytes)

julia> @btime remf(x) setup=(x=10rand()-5);
  1.738 ns (0 allocations: 0 bytes)