Rev | Line | |
---|
[9] | 1 | /*
|
---|
| 2 | (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
---|
| 3 | See the copyright notice in the ACK home directory, in the file "Copyright".
|
---|
| 4 | */
|
---|
| 5 |
|
---|
| 6 | /* $Header: /cvsup/minix/src/lib/ack/float/ngf8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
|
---|
| 7 |
|
---|
| 8 | /*
|
---|
| 9 | NEGATE A FLOATING POINT (NGF 8)
|
---|
| 10 | */
|
---|
| 11 | /********************************************************/
|
---|
| 12 |
|
---|
| 13 | #include "FP_types.h"
|
---|
| 14 | #include "get_put.h"
|
---|
| 15 |
|
---|
| 16 | #define OFF ((FL_MSL_AT_LOW_ADDRESS ? 0 : 4) + (FL_MSW_AT_LOW_ADDRESS ? 0 : 2) + (FL_MSB_AT_LOW_ADDRESS ? 0 : 1))
|
---|
| 17 |
|
---|
| 18 | void
|
---|
| 19 | ngf8(f)
|
---|
| 20 | DOUBLE f;
|
---|
| 21 | {
|
---|
| 22 | unsigned char *p;
|
---|
| 23 |
|
---|
| 24 | if (f.d[0] != 0 || f.d[1] != 0) {
|
---|
| 25 | p = (unsigned char *) &f + OFF;
|
---|
| 26 | *p ^= 0x80;
|
---|
| 27 | }
|
---|
| 28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.