Skip to content

Commit

Permalink
fix error msg in math.log
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-develop committed Dec 7, 2024
1 parent 96859e7 commit 1ee244c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ It consists of 6 sections, titled `Added`, `Changed`, `Deprecated`, `Removed`,
keeping track of the changes relative to the Nougaro Calculator under the same
6-sections format.

## upcoming

### Fixed
* Fix error message in `math.log` and `math.log2` when base = 1

## 1.2.0 (2024-12-07)

### Added
Expand Down
4 changes: 2 additions & 2 deletions lib_/math_.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def execute_math_log(self, exec_context: Context):
except ZeroDivisionError as e:
return RTResult().failure(RTArithmeticError(
self.pos_start, self.pos_end,
"Python ZeroDivisionError: {e}",
f"Python ZeroDivisionError: {e}",
exec_context,
origin_file="lib_.math_.Math.execute_math_log"
))
Expand Down Expand Up @@ -530,7 +530,7 @@ def execute_math_log2(self, exec_context: Context):
except ZeroDivisionError as e:
return RTResult().failure(RTArithmeticError(
self.pos_start, self.pos_end,
"Python ZeroDivisionError: {e}",
f"Python ZeroDivisionError: {e}",
exec_context,
origin_file="lib_.math_.Math.execute_math_log"
))
Expand Down

0 comments on commit 1ee244c

Please sign in to comment.