Skip to content

Commit

Permalink
FIX: LessThan in ToRA-1 Prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ZubinGou committed Jan 10, 2024
1 parent 10fe71a commit e79fc91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/prompts/tora/math.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ Let's use `sympy` to solve the inequality:
```python
from sympy import symbols, simplify
from sympy.solvers.inequalities import solve_univariate_inequality
from sympy.core.relational import LessThan
from sympy.core.relational import StrictLessThan

def solve_inequality():
x = symbols('x')
expression = (x**2 - 25) / (x + 5)
inequality = LessThan(expression, 0)
inequality = StrictLessThan(expression, 0)
solution = solve_univariate_inequality(inequality, x, relational=False)
simplified_solution = simplify(solution)

Expand All @@ -124,7 +124,7 @@ result = solve_inequality()
print(result)
```
```output
Union(Interval.open(-oo, -5), Interval.Lopen(-5, 5))
Union(Interval.open(-oo, -5), Interval.open(-5, 5))
```
The answer is $\boxed{(-\infty,-5)\cup(-5,5)}$

Expand Down

0 comments on commit e79fc91

Please sign in to comment.