1/* 2 * Copyright (c) 1983 Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that this notice is preserved and that due credit is given 7 * to the University of California at Berkeley. The name of the University 8 * may not be used to endorse or promote products derived from this 9 * software without specific written prior permission. This software 10 * is provided ``as is'' without express or implied warranty. 11 */ 12 13#if defined(SYSLIBC_SCCS) && !defined(lint) 14_sccsid:.asciz "@(#)modf.s 5.3 (Berkeley) 05/25/88" 15#endif /* SYSLIBC_SCCS and not lint */ 16 17/* 18 * double modf (value, iptr) 19 * double value, *iptr; 20 * 21 * Modf returns the fractional part of "value", 22 * and stores the integer part indirectly through "iptr". 23 */ 24 25#include "DEFS.h" 26 27ENTRY(modf, 0) 28 emodd 4(ap),$0,$0f1.0,r2,r0 29 jvs 1f # integer overflow 30 cvtld r2,*12(ap) 31 ret 321: 33 subd3 r0,4(ap),*12(ap) 34 ret 35