Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
trs
Commits
4b2db8c0
Commit
4b2db8c0
authored
Nov 17, 2012
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some negation issues in integral rules
parent
a4a7af9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
src/rules/integrals.py
src/rules/integrals.py
+10
-8
No files found.
src/rules/integrals.py
View file @
4b2db8c0
...
@@ -52,14 +52,16 @@ def solve_integral(integral, F):
...
@@ -52,14 +52,16 @@ def solve_integral(integral, F):
F
+=
choose_constant
(
integral
)
F
+=
choose_constant
(
integral
)
if
len
(
integral
)
<
3
:
if
len
(
integral
)
<
3
:
return
F
solution
=
F
else
:
x
,
lbnd
,
ubnd
=
integral
[
1
:
4
]
x
,
lbnd
,
ubnd
=
integral
[
1
:
4
]
if
x
!=
find_variable
(
F
):
solution
=
substitute
(
F
,
x
,
ubnd
)
-
substitute
(
F
,
x
,
lbnd
)
else
:
solution
=
indef
(
F
,
lbnd
,
ubnd
)
if
x
!=
find_variable
(
F
):
return
negate
(
solution
,
integral
.
negated
)
return
substitute
(
F
,
x
,
ubnd
)
-
substitute
(
F
,
x
,
lbnd
)
return
indef
(
F
,
lbnd
,
ubnd
)
def
match_solve_indef
(
node
):
def
match_solve_indef
(
node
):
...
@@ -78,7 +80,7 @@ def solve_indef(root, args):
...
@@ -78,7 +80,7 @@ def solve_indef(root, args):
Fx
,
a
,
b
=
root
Fx
,
a
,
b
=
root
x
=
find_variable
(
Fx
)
x
=
find_variable
(
Fx
)
return
substitute
(
Fx
,
x
,
b
)
-
substitute
(
Fx
,
x
,
a
)
return
negate
(
substitute
(
Fx
,
x
,
b
)
-
substitute
(
Fx
,
x
,
a
),
root
.
negated
)
def
solve_indef_msg
(
root
,
args
):
# pragma: nocover
def
solve_indef_msg
(
root
,
args
):
# pragma: nocover
...
@@ -386,7 +388,7 @@ def remove_indef_constant(root, args):
...
@@ -386,7 +388,7 @@ def remove_indef_constant(root, args):
Fx
=
scope
.
as_nary_node
()
Fx
=
scope
.
as_nary_node
()
a
,
b
=
root
[
1
:]
a
,
b
=
root
[
1
:]
return
indef
(
Fx
,
a
,
b
)
return
negate
(
indef
(
Fx
,
a
,
b
),
root
.
negated
)
MESSAGES
[
remove_indef_constant
]
=
\
MESSAGES
[
remove_indef_constant
]
=
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment