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

Decimal tweaks #10480

Closed
5 tasks done
GregoryTravis opened this issue Jul 8, 2024 · 8 comments
Closed
5 tasks done

Decimal tweaks #10480

GregoryTravis opened this issue Jul 8, 2024 · 8 comments
Assignees
Labels
-libs Libraries: New libraries to be implemented p-low Low priority

Comments

@GregoryTravis
Copy link
Contributor

GregoryTravis commented Jul 8, 2024

  • Rename Decimal.from_string to Decimal.from_text.
  • Add a dec function to top level namespace
  • Integers are automatically converted to decimals when used in decimal operations
  • [ ] Arithmetic Decimal operations between a decimal and a float should throw an error
  • Should promote the float to a decimal and attach a warning (saying best to use decimals
  • Comparison Perform the comparison between the decimal and the float; Attach same warning as equality.
@GregoryTravis GregoryTravis added p-low Low priority -libs Libraries: New libraries to be implemented labels Jul 8, 2024
@GregoryTravis GregoryTravis self-assigned this Jul 8, 2024
@github-project-automation github-project-automation bot moved this to ❓New in Issues Board Jul 8, 2024
@GregoryTravis GregoryTravis moved this from ❓New to 📤 Backlog in Issues Board Jul 8, 2024
@GregoryTravis GregoryTravis moved this from 📤 Backlog to 🔧 Implementation in Issues Board Jul 8, 2024
@enso-bot
Copy link

enso-bot bot commented Jul 8, 2024

Greg Travis reports a new STANDUP for today (2024-07-08):

Progress: updating Decimal behavior according to JD+AR’s new decisions; now trying to make f+d mixed operations an error It should be finished by 2024-07-15.

Next Day: test failures

@enso-bot
Copy link

enso-bot bot commented Jul 9, 2024

Greg Travis reports a new STANDUP for today (2024-07-09):

Progress: removed float/decimal conversion, fixing tests from that, and adding extra info for float/decimal mixed operation errors It should be finished by 2024-07-15.

Next Day: conversions

@GregoryTravis
Copy link
Contributor Author

#10517 does not implement errors for mixed float/decimal arithmetic. There are a few options, none of them acceptable yet:

  • Keeping from conversions between Float and Decimal means that Floats are promoted to Decimal transparently for all arithmetic operations, making it impossible to throw an error in these cases (without undesirable special cases engine hacks).
  • Removing from conversions means that equality between Floats and Decimals cannot be accomplished (without undesirable special cases engine hacks), since equality is implemented as a builtin and only uses EqualsSimpleNode and from comparisons.
  • Promoting warnings to errors in arithmetic operations would surely make them much slower.

@enso-bot
Copy link

enso-bot bot commented Jul 10, 2024

Greg Travis reports a new STANDUP for today (2024-07-10):

Progress: completed Decimal usability tweaks (except errors); attempted to implement errors, documented results It should be finished by 2024-07-15.

Next Day: equality errors? otherwise other small decimal fixes

@enso-bot
Copy link

enso-bot bot commented Jul 11, 2024

Greg Travis reports a new STANDUP for today (2024-07-11):

Progress: finished first tweaks; tracking down a non-reproducible bug about interop for EnsoObject It should be finished by 2024-07-15.

Next Day: bug; comparisons

@enso-bot
Copy link

enso-bot bot commented Jul 15, 2024

Greg Travis reports a new STANDUP for today (2024-07-15):

Progress: spent all day tracking down warning-related bug caused by using a checked return type. Continuing to work on decimal mixed comparisons. It should be finished by 2024-07-16.

Next Day: bug; comparisons

@enso-bot
Copy link

enso-bot bot commented Jul 16, 2024

Greg Travis reports a new STANDUP for today (2024-07-16):

Progress: mixed decimal comparisons, getting tests to pass; why (again) can I not run the front end? It should be finished by 2024-07-17.

Next Day: bug; comparisons

@GregoryTravis
Copy link
Contributor Author

Closing, as I've moved the error task to #10631

@github-project-automation github-project-automation bot moved this from 🔧 Implementation to 🟢 Accepted in Issues Board Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-libs Libraries: New libraries to be implemented p-low Low priority
Projects
Archived in project
Development

No branches or pull requests

1 participant