cprover
Loading...
Searching...
No Matches
convert_real_literal.cpp
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Statement List Language Conversion
4
5Author: Matthias Weiss, matthias.weiss@diffblue.com
6
7\*******************************************************************/
8
11
14
16#include <util/ieee_float.h>
17
18constant_exprt convert_real_literal(const std::string &src)
19{
21 real.from_float(std::stof(src));
22 return real.to_expr();
23}
Pre-defined bitvector types.
A constant literal expression.
Definition: std_expr.h:2807
constant_exprt convert_real_literal(const std::string &src)
Converts a string into the corresponding 'Real' expression.
Statement List Language Conversion.
floatbv_typet get_real_type()
Creates a new type that resembles the 'Real' type of the Siemens PLC languages.
Statement List Type Helper.