Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
trs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
trs
Commits
b3f48cb6
Commit
b3f48cb6
authored
12 years ago
by
Sander Mathijs van Veen
Browse files
Options
Downloads
Patches
Plain Diff
Add remaining backtricks for mathematical notation.
parent
aca8a137
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/rules/logarithmic.py
+6
-6
6 additions, 6 deletions
src/rules/logarithmic.py
src/rules/numerics.py
+1
-1
1 addition, 1 deletion
src/rules/numerics.py
src/rules/powers.py
+1
-1
1 addition, 1 deletion
src/rules/powers.py
src/rules/precedences.py
+0
-1
0 additions, 1 deletion
src/rules/precedences.py
with
8 additions
and
9 deletions
src/rules/logarithmic.py
+
6
−
6
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
):
...
...
This diff is collapsed.
Click to expand it.
src/rules/numerics.py
+
1
−
1
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
_
...
...
This diff is collapsed.
Click to expand it.
src/rules/powers.py
+
1
−
1
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
):
...
...
This diff is collapsed.
Click to expand it.
src/rules/precedences.py
+
0
−
1
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment