From af5f4c3dc2e05c3bad03da45f20de8e70837fa7b Mon Sep 17 00:00:00 2001 From: David Wasley Date: Fri, 21 Jan 1983 19:10:11 -0800 Subject: [PATCH] date and time created 83/01/21 11:10:11 by dlw SCCS-vsn: usr.bin/f77/libF77/d_mod.c 1.1 --- usr/src/usr.bin/f77/libF77/d_mod.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 usr/src/usr.bin/f77/libF77/d_mod.c diff --git a/usr/src/usr.bin/f77/libF77/d_mod.c b/usr/src/usr.bin/f77/libF77/d_mod.c new file mode 100644 index 0000000000..30f22ad17d --- /dev/null +++ b/usr/src/usr.bin/f77/libF77/d_mod.c @@ -0,0 +1,14 @@ +/* + * "@(#)d_mod.c 1.1" + */ + +double d_mod(x,y) +double *x, *y; +{ +double floor(), quotient = *x / *y; +if (quotient >= 0.0) + quotient = floor(quotient); +else + quotient = -floor(-quotient); +return(*x - (*y) * quotient ); +} -- 2.20.1