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
b3f48cb6
Commit
b3f48cb6
authored
May 24, 2012
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add remaining backtricks for mathematical notation.
parent
aca8a137
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
9 deletions
+8
-9
src/rules/logarithmic.py
src/rules/logarithmic.py
+6
-6
src/rules/numerics.py
src/rules/numerics.py
+1
-1
src/rules/powers.py
src/rules/powers.py
+1
-1
src/rules/precedences.py
src/rules/precedences.py
+0
-1
No files found.
src/rules/logarithmic.py
View file @
b3f48cb6
...
...
@@ -58,7 +58,7 @@ def base_equals_raised(root, args):
return
L
(
1
).
negate
(
root
.
negated
)
MESSAGES
[
base_equals_raised
]
=
_
(
'Logarithm {0} reduces to
1
.'
)
MESSAGES
[
base_equals_raised
]
=
_
(
'Logarithm {0} reduces to
`1`
.'
)
def
divide_same_base
(
root
,
args
):
...
...
@@ -70,7 +70,7 @@ def divide_same_base(root, args):
return
log
(
raised
)
/
log
(
base
)
MESSAGES
[
divide_same_base
]
=
_
(
'Apply
log_b(a) = log(a) / log(b)
on {0}.'
)
MESSAGES
[
divide_same_base
]
=
_
(
'Apply
`log_b(a) = log(a) / log(b)`
on {0}.'
)
def
match_add_logarithms
(
node
):
...
...
@@ -127,7 +127,7 @@ def add_logarithms(root, args):
return
scope
.
as_nary_node
()
MESSAGES
[
add_logarithms
]
=
_
(
'Apply
log(a) + log(b) = log(ab)
.'
)
MESSAGES
[
add_logarithms
]
=
_
(
'Apply
`log(a) + log(b) = log(ab)`
.'
)
#_('Combine logarithms with the same base: {2} and {3}.')
...
...
@@ -144,7 +144,7 @@ def expand_negations(root, args):
MESSAGES
[
expand_negations
]
=
\
_
(
'Apply
-log(a) - log(b) = -(log(a) + log(b))
.'
)
_
(
'Apply
`-log(a) - log(b) = -(log(a) + log(b))`
.'
)
def
subtract_logarithms
(
root
,
args
):
...
...
@@ -161,7 +161,7 @@ def subtract_logarithms(root, args):
return
scope
.
as_nary_node
()
MESSAGES
[
subtract_logarithms
]
=
_
(
'Apply
log(a) - log(b) = log(a / b)
.'
)
MESSAGES
[
subtract_logarithms
]
=
_
(
'Apply
`log(a) - log(b) = log(a / b)`
.'
)
def
match_raised_base
(
node
):
...
...
@@ -212,7 +212,7 @@ def raised_base(root, args):
return
args
[
0
]
MESSAGES
[
raised_base
]
=
_
(
'Apply
g ^ log_g(a) = a
on {0}.'
)
MESSAGES
[
raised_base
]
=
_
(
'Apply
`g ^ (log_(g)(a)) = a`
on {0}.'
)
def
match_factor_out_exponent
(
node
):
...
...
src/rules/numerics.py
View file @
b3f48cb6
...
...
@@ -2,7 +2,7 @@ from itertools import combinations
from
.utils
import
greatest_common_divisor
,
is_numeric_node
from
..node
import
ExpressionLeaf
as
Leaf
,
Scope
,
OP_ADD
,
OP_DIV
,
OP_MUL
,
\
OP_POW
,
negate
OP_POW
from
..possibilities
import
Possibility
as
P
,
MESSAGES
from
..translate
import
_
...
...
src/rules/powers.py
View file @
b3f48cb6
...
...
@@ -293,7 +293,7 @@ def remove_power_of_zero(root, args):
return
L
(
1
)
MESSAGES
[
remove_power_of_zero
]
=
_
(
'Power of zero {0} rewrites to
1
.'
)
MESSAGES
[
remove_power_of_zero
]
=
_
(
'Power of zero {0} rewrites to
`1`
.'
)
def
remove_power_of_one
(
root
,
args
):
...
...
src/rules/precedences.py
View file @
b3f48cb6
...
...
@@ -7,7 +7,6 @@ from .logarithmic import factor_in_exponent_multiplicant, \
from
.derivatives
import
chain_rule
from
.negation
import
double_negation
,
negated_factor
,
negated_nominator
,
\
negated_denominator
,
negated_zero
from
.factors
import
expand_double
,
expand_single
from
.fractions
import
multiply_with_fraction
,
divide_fraction_by_term
,
\
add_nominators
from
.integrals
import
factor_out_constant
,
integrate_variable_root
...
...
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