cprover
Loading...
Searching...
No Matches
mathematical_types.cpp
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Mathematical types
4
5Author: Daniel Kroening, kroening@kroening.com
6 Maria Svorenova, maria.svorenova@diffblue.com
7
8\*******************************************************************/
9
12
13#include "mathematical_types.h"
14
17bool is_number(const typet &type)
18{
19 const irep_idt &id = type.id();
20 return id == ID_rational || id == ID_real || id == ID_integer ||
21 id == ID_natural || id == ID_complex || id == ID_unsignedbv ||
22 id == ID_signedbv || id == ID_floatbv || id == ID_fixedbv;
23}
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition dstring.h:37
const irep_idt & id() const
Definition irep.h:396
The type of an expression, extends irept.
Definition type.h:29
bool is_number(const typet &type)
Returns true if the type is a rational, real, integer, natural, complex, unsignedbv,...
Mathematical types.