Skip to content

Conversation

google-labs-jules[bot]
Copy link

This change fixes a bug in the evaluate_expr function that caused incorrect handling of expressions in scientific notation. The function now correctly returns the expression if it can be converted to a float, and a related test has been improved for clarity.

The `evaluate_expr` function was incorrectly calling `convert_scinot` on expressions that could already be converted to a float. This would cause expressions in scientific notation to be processed incorrectly.

This change corrects the `evaluate_expr` function to return the expression directly if it can be converted to a float, preventing the incorrect processing.

Additionally, a test for scientific notation was updated to use a more descriptive variable name, improving readability.
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.

0 participants