Skip to content

Type consistent string preprocessing for floating-point expressions #1656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion regression/jbmc-strings/StringValueOf09/test.desc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
THOROUGH
CORE
StringValueOf09.class
--refine-strings --string-max-length 1000
^EXIT=10$
Expand Down
2 changes: 1 addition & 1 deletion src/java_bytecode/java_string_library_preprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ codet java_string_library_preprocesst::make_float_to_string_code(
exprt str=allocate_fresh_string(type.return_type(), loc, symbol_table, code);

// Expression representing 0.0
ieee_float_spect float_spec=ieee_float_spect::single_precision();
ieee_float_spect float_spec(to_floatbv_type(params[0].type()));
ieee_floatt zero_float(float_spec);
zero_float.from_float(0.0);
constant_exprt zero=zero_float.to_expr();
Expand Down