Commit | Line | Data |
---|---|---|
d5a80657 KM |
1 | #ifndef lint |
2 | .asciz "@(#)modf.s 5.1 (Berkeley) %G%" | |
3 | #endif not lint | |
8de9883f BJ |
4 | |
5 | /* | |
6 | * double modf (value, iptr) | |
7 | * double value, *iptr; | |
8 | * | |
9 | * Modf returns the fractional part of "value", | |
10 | * and stores the integer part indirectly through "iptr". | |
11 | */ | |
12 | ||
13 | #include "DEFS.h" | |
14 | ||
dadab5a2 | 15 | ENTRY(modf, 0) |
8de9883f BJ |
16 | emodd 4(ap),$0,$0f1.0,r2,r0 |
17 | jvs 1f # integer overflow | |
18 | cvtld r2,*12(ap) | |
19 | ret | |
20 | 1: | |
21 | subd3 r0,4(ap),*12(ap) | |
22 | ret |