Return Python float floor division a // b for a, b > 0.
Follows CPython float_floor_div, so axis_offset picks exactly matplotlib's decades.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | a |
Dividend. |
||
| real(kind=real64), | intent(in) | :: | b |
Divisor. |
pure function floordiv(a, b) result(f) !! Return Python float floor division `a // b` for `a, b > 0`. !! !! Follows CPython `float_floor_div`, so `axis_offset` picks exactly matplotlib's decades. ! Arguments real(real64), intent(in) :: a !! Dividend. real(real64), intent(in) :: b !! Divisor. real(real64) :: f, d d = (a - c_fmod(a, b))/b f = aint(d) if (d - f > 0.5d0) f = f + 1.d0 end function floordiv