SystemC  2.3.2
Accellera SystemC proof-of-concept library
scfx_pow10.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4  more contributor license agreements. See the NOTICE file distributed
5  with this work for additional information regarding copyright ownership.
6  Accellera licenses this file to you under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with the
8  License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15  implied. See the License for the specific language governing
16  permissions and limitations under the License.
17 
18  *****************************************************************************/
19 
20 /*****************************************************************************
21 
22  scfx_pow10.h -
23 
24  Original Author: Robert Graulich, Synopsys, Inc.
25  Martin Janssen, Synopsys, Inc.
26 
27  *****************************************************************************/
28 
29 /*****************************************************************************
30 
31  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
32  changes you are making here.
33 
34  Name, Affiliation, Date:
35  Description of Modification:
36 
37  *****************************************************************************/
38 
39 // $Log: scfx_pow10.h,v $
40 // Revision 1.1.1.1 2006/12/15 20:20:04 acg
41 // SystemC 2.3
42 //
43 // Revision 1.3 2006/01/13 18:53:58 acg
44 // Andy Goodrich: added $Log command so that CVS comments are reproduced in
45 // the source.
46 //
47 
48 #ifndef SCFX_POW10_H
49 #define SCFX_POW10_H
50 
51 
53 
54 
55 namespace sc_dt
56 {
57 
58 // classes defined in this module
59 class scfx_pow10;
60 
61 
68 const int SCFX_POW10_TABLE_SIZE = 32;
69 
70 
72 {
73 
74 public:
75 
76  scfx_pow10();
77  ~scfx_pow10();
78 
79  const scfx_rep operator() ( int );
80 
81 private:
82 
83  scfx_rep* pos( int );
84  scfx_rep* neg( int );
85 
88 };
89 
90 } // namespace sc_dt
91 
92 
93 #endif
94 
95 // Taf!
void neg(sc_fxval &c, const sc_fxnum &a)
Definition: sc_fxnum.h:2690
Class to compute (and cache) powers of 10 in arbitrary precision.
Definition: scfx_pow10.h:71
Arbitrary-precision fixed-point implementation class.
Definition: scfx_rep.h:144
const int SCFX_POW10_TABLE_SIZE
Definition: scfx_pow10.h:68
#define SC_API
Definition: sc_cmnhdr.h:168