adf8.c 534 B

1234567891011121314151617181920212223242526272829303132
  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. /* $Id$ */
  6. /*
  7. ADD TWO FLOATS - DOUBLE (ADF 8)
  8. */
  9. #include "FP_types.h"
  10. void
  11. adf8(s2,s1)
  12. DOUBLE s1,s2;
  13. {
  14. EXTEND e1,e2;
  15. if (s1.d[0] == 0 && s1.d[1] == 0) {
  16. s1 = s2;
  17. return;
  18. }
  19. if (s2.d[0] == 0 && s2.d[1] == 0) {
  20. return;
  21. }
  22. extend(&s1.d[0],&e1,sizeof(DOUBLE));
  23. extend(&s2.d[0],&e2,sizeof(DOUBLE));
  24. add_ext(&e1,&e2);
  25. compact(&e1,&s1.d[0],sizeof(DOUBLE));
  26. }