Skip to content
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

Implement floating point const and add #424

Merged
merged 4 commits into from
Jul 31, 2020
Merged

Implement floating point const and add #424

merged 4 commits into from
Jul 31, 2020

Conversation

chfast
Copy link
Collaborator

@chfast chfast commented Jul 15, 2020

A symbolic milestone starting floating point support implementation.

lib/fizzy/value.hpp Outdated Show resolved Hide resolved
@chfast
Copy link
Collaborator Author

chfast commented Jul 16, 2020 via email

@codecov
Copy link

codecov bot commented Jul 28, 2020

Codecov Report

Merging #424 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #424      +/-   ##
==========================================
- Coverage   99.54%   99.51%   -0.03%     
==========================================
  Files          51       52       +1     
  Lines       14663    14791     +128     
==========================================
+ Hits        14596    14719     +123     
- Misses         67       72       +5     

@axic
Copy link
Member

axic commented Jul 30, 2020

Doesnt this need spectest expectation update in CI?

@chfast
Copy link
Collaborator Author

chfast commented Jul 30, 2020

Doesnt this need spectest expectation update in CI?

I was expecting that, but no. What is the conditions for skipping a spec test?

Base automatically changed from value_type_cleanup to master July 30, 2020 20:05
@chfast chfast changed the title Implement f32.add Implement floating point const and add Jul 30, 2020
@chfast chfast force-pushed the value_f32 branch 3 times, most recently from e0b6b1c to c4b6629 Compare July 30, 2020 20:35
@chfast chfast requested a review from axic July 30, 2020 20:36
TEST(value, constructor_from_floating_points)
{
EXPECT_EQ(Value{123.456f}.f32, 123.456f);
EXPECT_EQ(Value{123.456789001}.f64, 123.456789001);
Copy link
Member

@axic axic Jul 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have a test for min/max, with a large mantissa.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean the total max/min, or the biggest mantissa only?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used some special values in tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically something which can not be represented in f32. f64::max() is fine, but not sure what that is actually storing, I believe a large exponent?

lib/fizzy/parser_expr.cpp Outdated Show resolved Hide resolved
lib/fizzy/parser_expr.cpp Outdated Show resolved Hide resolved
@chfast chfast merged commit ad0592c into master Jul 31, 2020
@chfast chfast deleted the value_f32 branch July 31, 2020 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants