OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [newlib-1.18.0/] [newlib/] [libc/] [stdlib/] [__ten_mu.c] - Blame information for rev 829

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
/*
2
 * [atw] multiply 64 bit accumulator by 10 and add digit.
3
 * The KA/CA way to do this should be to use
4
 * a 64-bit integer internally and use "adjust" to
5
 * convert it to float at the end of processing.
6
 */
7
 
8
#include <_ansi.h>
9
#include "std.h"
10
 
11
int
12
_DEFUN (__ten_mul, (acc, digit),
13
        double *acc _AND
14
        int digit)
15
{
16
  /*
17
   * [atw] Crude, but effective (at least on a KB)...
18
   */
19
 
20
  *acc *= 10;
21
  *acc += digit;
22
 
23
  return 0;                      /* no overflow */
24
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.