Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
luatex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
TeXLive
luatex
Commits
fe955c1c
Commit
fe955c1c
authored
6 years ago
by
Luigi Scarso
Browse files
Options
Downloads
Patches
Plain Diff
restored patches missed with latest commit.
[[Split portion of a mixed commit.]]
parent
1bed439c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/texk/web2c/mplibdir/mp.w
+24
-5
24 additions, 5 deletions
source/texk/web2c/mplibdir/mp.w
with
24 additions
and
5 deletions
source/texk/web2c/mplibdir/mp.w
+
24
−
5
View file @
fe955c1c
...
...
@@ -756,7 +756,7 @@ defined.
@<Glob...@>=
integer bad; /* is some ``constant'' wrong? */
@ Later on we will say `|if ( int_packets+17*int_increment>bistack_size )mp->bad=19;|',
@ Later on we will say `|if ( int_packets+
(
17
+2)
*int_increment>bistack_size )mp->bad=19;|',
or something similar.
In case you are wondering about the non-consequtive values of |bad|: most
...
...
@@ -4800,7 +4800,7 @@ double mp_get_numeric_value (MP mp, const char *s, size_t l) {
mp_loop_data *s;
s = mp->loop_ptr;
while (s != NULL && sym != s->var)
s =
mp->loop_ptr
->link;
s =
s
->link;
if (s != NULL && sym == s->var ){
mp_xfree (ss);
return number_to_double(s->old_value) ;
...
...
@@ -4860,7 +4860,7 @@ mp_knot mp_get_path_value (MP mp, const char *s, size_t l) {
char *ss = mp_xstrdup(mp,s);
if (ss) {
mp_sym sym = mp_id_lookup(mp,ss,l,false);
if (sym != NULL) {
if (sym !=
NULL && sym->v.data.node !=
NULL) {
if (mp_type(sym->v.data.node) == mp_path_type) {
mp_xfree (ss);
return (mp_knot) sym->v.data.node->data.p;
...
...
@@ -15683,7 +15683,7 @@ mp->bisect_stack = xmalloc ((bistack_size + 1), sizeof (mp_number));
xfree (mp->bisect_stack);
@ @<Check the ``constant''...@>=
if (int_packets + 17 * int_increment > bistack_size)
if (int_packets +
(
17
+2)
* int_increment > bistack_size)
mp->bad = 19;
@ Computation of the min and max is a tedious but fairly fast sequence of
...
...
@@ -15772,11 +15772,28 @@ and |(pp,mp_link(pp))|, respectively.
@c
static void mp_cubic_intersection (MP mp, mp_knot p, mp_knot pp) {
mp_knot q, qq; /* |mp_link(p)|, |mp_link(pp)| */
mp_number x_two_t; /* increment bit precision by x bit */
mp->time_to_go = max_patience;
set_number_from_scaled (mp->max_t, 2);
new_number (x_two_t);
number_clone (x_two_t,two_t);
number_double(x_two_t); number_double(x_two_t); /* add x=2 bit of precision */
number_double(x_two_t);
@<Initialize for intersections at level zero@>;
CONTINUE:
while (1) {
/* When we are in arbitrary precision math, low precisions can */
/* lead to acces locations beyond the stack_size: in this case */
/* we say that there is no intersection.*/
if ( ((x_packet (mp->xy))+4)>bistack_size ||
((u_packet (mp->uv))+4)>bistack_size ||
((y_packet (mp->xy))+4)>bistack_size ||
((v_packet (mp->uv))+4)>bistack_size ){
set_number_from_scaled (mp->cur_t, 1);
set_number_from_scaled (mp->cur_tt, 1);
goto NOT_FOUND;
}
if (number_to_scaled (mp->delx) - mp->tol <=
number_to_scaled (stack_max (x_packet (mp->xy))) - number_to_scaled (stack_min (u_packet (mp->uv))))
if (number_to_scaled (mp->delx) + mp->tol >=
...
...
@@ -15786,7 +15803,8 @@ CONTINUE:
if (number_to_scaled (mp->dely) + mp->tol >=
number_to_scaled (stack_min (y_packet (mp->xy))) - number_to_scaled (stack_max (v_packet (mp->uv)))) {
if (number_to_scaled (mp->cur_t) >= number_to_scaled (mp->max_t)) {
if (number_equal(mp->max_t, two_t)) { /* we've done 17 bisections */
if (number_equal(mp->max_t, x_two_t)) { /* we've done 17+x bisections */
number_divide_int(mp->cur_t,1<<3);number_divide_int(mp->cur_tt,1<<3);
set_number_from_scaled (mp->cur_t, ((number_to_scaled (mp->cur_t) + 1)/2));
set_number_from_scaled (mp->cur_tt, ((number_to_scaled (mp->cur_tt) + 1)/2));
return;
...
...
@@ -15801,6 +15819,7 @@ CONTINUE:
if (mp->time_to_go > 0) {
decr (mp->time_to_go);
} else {
number_divide_int(mp->appr_t,1<<3);number_divide_int(mp->appr_tt,1<<3);
while (number_less (mp->appr_t, unity_t)) {
number_double(mp->appr_t);
number_double(mp->appr_tt);
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