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
504b9da8
Commit
504b9da8
authored
Jan 12, 2012
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added additional possibility messages.
parent
b76e0386
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
src/rules/powers.py
src/rules/powers.py
+13
-3
No files found.
src/rules/powers.py
View file @
504b9da8
...
@@ -138,9 +138,7 @@ def add_exponents(root, args):
...
@@ -138,9 +138,7 @@ def add_exponents(root, args):
return
nary_node
(
'*'
,
scope
)
return
nary_node
(
'*'
,
scope
)
#MESSAGES[add_exponents] = _('Add the exponents of {1[0]} and {1[1]}, which'
MESSAGES
[
add_exponents
]
=
_
(
'Add the exponents {1} and {2}, which'
# ' will reduce to {1[0][0]}^({1[0][1]} + {1[1][1]}).')
MESSAGES
[
add_exponents
]
=
_
(
'Add the exponents of {1} and {2}, which'
' will reduce to {1[0]}^({1[1]} + {2[1]}).'
)
' will reduce to {1[0]}^({1[1]} + {2[1]}).'
)
...
@@ -153,6 +151,10 @@ def subtract_exponents(root, args):
...
@@ -153,6 +151,10 @@ def subtract_exponents(root, args):
return
a
**
(
p
-
q
)
return
a
**
(
p
-
q
)
MESSAGES
[
subtract_exponents
]
=
_
(
'Substract the exponents {1} and {2},'
' which will reduce to {1[0]}^({1[1]} - {2[1]}).'
)
def
multiply_exponents
(
root
,
args
):
def
multiply_exponents
(
root
,
args
):
"""
"""
(a^p)^q -> a^(pq)
(a^p)^q -> a^(pq)
...
@@ -162,6 +164,10 @@ def multiply_exponents(root, args):
...
@@ -162,6 +164,10 @@ def multiply_exponents(root, args):
return
a
**
(
p
*
q
)
return
a
**
(
p
*
q
)
MESSAGES
[
multiply_exponents
]
=
_
(
'Multiply the exponents {1} and {2},'
' which will reduce to {1[0]}^({1[1]} * {2[1]}).'
)
def
duplicate_exponent
(
root
,
args
):
def
duplicate_exponent
(
root
,
args
):
"""
"""
(ab)^p -> a^p * b^p
(ab)^p -> a^p * b^p
...
@@ -176,6 +182,10 @@ def duplicate_exponent(root, args):
...
@@ -176,6 +182,10 @@ def duplicate_exponent(root, args):
return
result
return
result
MESSAGES
[
duplicate_exponent
]
=
_
(
'Duplicate the exponents {1} and {2},'
' which will reduce to {1[0]}^({1[1]} * {2[1]}).'
)
def
remove_negative_exponent
(
root
,
args
):
def
remove_negative_exponent
(
root
,
args
):
"""
"""
a^-p -> 1 / a^p
a^-p -> 1 / a^p
...
...
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