Repository navigation
[4.0.0] - 2026-10-06
The release where a solve tells you what it is doing. Multiprecision numbers go straight onto a
matplotlib axis, every object describes itself when printed instead of giving you its address, and
a long solve reports how far it has got. Underneath that sits a large correctness pass --
precision, endpoint classification, the classic-format round trip, path crossings, start points --
and Intel macOS wheels are built and tested again. A seeded solve now gives the same bits however
it runs: serially, on any number of threads, or across MPI ranks.
A major version because it breaks source compatibility. A System no longer carries a
precision, because evaluation happens at the precision of the point it is handed.
final_tolerance belongs to the endgame alone. The tracker's predictor, tracking tolerance and
path truncation threshold are a config rather than bare members. moving_homotopy is gone,
subsumed by straight_line_homotopy, which returns a record carrying the homotopy, its two ends
and the gamma actually used. Homogenize() throws where it used to half-succeed.
It also breaks quietly, which matters more: code that still compiles can get different
answers. The default endgame is power series rather than Cauchy, InEGOperatingZone changed
meaning, a system can now declare coordinates that the finiteness and realness tests must ignore,
and function(i) addresses the patch rows on a patched system. The thread count is
BERTINI_NUM_THREADS, which defaults to every available CPU: OMP_NUM_THREADS no longer reaches
b2, and MPI ranks no longer default to one thread. set_random_seed(0) is now an ordinary,
reproducible seed rather than a request for entropy. Read Changed and Fixed before upgrading a
script whose answers you rely on.
Records written by 3.x are not recalled. Both content encodings moved -- b2sysenc/2 for
systems, b2cfgenc/4 for configs -- so a record written by an older version describes a different
ask and is recomputed rather than reused. Nothing is lost and nothing is silently wrong; it is
simply not reused. That remains the honest outcome for as long as a record's ask does not carry
the identity of the algorithm that answered it (#420).
A System archived or pickled by 3.x does not load in 4.0. What a System writes to a Boost archive changed: its precision is no longer written, and its auxiliary variable groups and auxiliary coordinates now are. A pickle holds such an archive, so a pickled System, or anything pickled that contains one, is affected in the same way. Rebuild the system from the code or the input file that made it. A records directory stores its systems as JSON and is not affected.
Removed
- The windows DLL plumbing is no longer part of the interface (#99).
bertini.windows_dll_managerwas importable, was listed in the API reference beside
Systemandtracking, and putget_dll_pathsandbuild_directory_managerinto the
bertininamespace on windows -- along withbertini.p, the leftover loop variable from
the import-time DLL search. It exists so thatimport bertinican find the DLLs the
native module needs, which is nothing a caller has business with, and it is
bertini._windows_dll_managernow. - A System no longer carries a precision.
System::precision(unsigned),
System::precision()and theprecision_member are all gone, in C++ and in Python.
Evaluation happens at the precision of the point it is handed, so there is nothing for a
caller to set and nothing to keep in sync -- that hand-alignment
(target = max(point, system, ambient); system.precision(target); ...) was the complaint
in #377, and refusing to evaluate on a mismatch could wedge a System outright, with no
escape through either setter.
The "materialized at" tag now lives with each holder of multiprecision values -- every
block's working coefficients, the patch, the SLP's memory -- each of which returns
immediately when already there, soSetVariablesfans out on every evaluation for the
cost of a few integer compares. The elision is deliberately per-holder and not at the
System: holders can legitimately disagree (that disagreement IS #377), and a System-level
cache would skip the very repair such a case needs.
There is also nothing to prepare and nothing to fan out. Every evaluable type -- each of
the four blocks, the patch, and the SLP -- self-aligns to the precision of the point it is
handed, under one uniformSyncPrecision. Two of them already did this independently;
the change makes the pattern and the name uniform, and the patch had a commented-out
assert demanding callers match its precision, which it now honours by aligning itself.
See ADR-0057.
Archive format changed:precision_is no longer serialized (transient evaluation
state, which the sameserializealready excludes elsewhere), so a System archived by an
older build will not load into a newer one. Boost archives carry Systems between MPI ranks
of one run; durable storage is the records/JSON path and is unaffected.
Added
- A node compares by what it is (ADR-0068).
Variable('x') == Variable('x')is true, and
so isx*y + 1 == 1 + y*x: nodes are interned, so equal expressions are one node, and==,
!=andhashnow compare the node. They used to compare the Python wrapper, which is a
new object on every call, so two handles on the same variable said they differed. Nodes
work as dictionary keys and in sets, and aVariableGroupcompares equal to a list of the
same variables. Comparing a node with something that is not a node is false. - A system that declares no variables takes the variables of the one it is combined with
(ADR-0068): functions with nothing said about variables can be concatenated onto, or
blended with, a system that has them.AdoptVariableStructurein C++. - bertini's list containers compare by value.
sys.degrees() == [2, 2]is now true when
the degrees are 2 and 2; before, every container's==was object identity, so it was false
-- as was comparing two calls ofsys.degrees()-- and a check had to be written
list(sys.degrees()) == [2, 2]. Every list container (ListOfInt,VariableGroup, the
solution lists, ...) is equal to any Python sequence of the same length whose elements are
equal pairwise; a solution vector counts as equal when all of its entries are. Like
Python's ownlist, the containers are no longer hashable. - Wheels for linux-aarch64 (#474).
pip install bertini2now works on 64-bit ARM Linux --
a Linux VM on an Apple silicon Mac, a Raspberry Pi 4 or 5, an ARM cloud instance -- instead of
requiring a build from source. Every supported Python (3.10 through 3.14) is covered, and
aarch64 is tested like the other platforms: the C++ test suite, and the full pytest suite
inside the manylinux container for each wheel. - A system can say which of its coordinates are auxiliary (#403). Bertini judges a point by
its largest coordinate, three times over: the tracker truncates a path past
path_truncation_threshold, the endgame abandons one pastSecurity.max_norm, and the solver
calls an endpoint pastendpoint_finite_thresholdinfinite. Several standard constructions
carry coordinates that exist for the construction rather than the answer -- a critical-point
system in null-vector form needs a patch on its null vector, and that patch fixes a
normalization nobody chose, so the block's direction is meaningful and its magnitude is an
artifact. Judged on such a coordinate, genuine solutions were declared at infinity, and there
is no threshold that would have been right, because the quantity is not governed.
System.set_auxiliary_variable_groupsandSystem.set_auxiliary_coordinatesname the
coordinates the question is not about;System.is_finiteandSystem.is_realare the
judgements, and the system owns them, so the tracker, the endgame and the classifier stop each
deriving their own. Realness had the identical defect one line from finiteness and is fixed
with it. Nothing else changes: an auxiliary coordinate is tracked, recorded and returned
exactly as before. Which coordinates are auxiliary is part of the system's content identity,
since the tracker truncates on the ones that are not -- so declaring one changes the digest and
makes a new ask. See ADR-0062 and the new "Auxiliary coordinates" tutorial. - The path-crossing verdict reaches the records (#365). The midpath check compares every path
against every other at the endgame boundary and re-tracks the ones that appear to have jumped
onto a neighbour; a path it finally gives up on has carriedcrossing_unresolvedin the solver's
metadata since this release's earlier work, but nothing persisted it. A records directory could not be
asked which paths were flagged, and recall brought such an endpoint back with the flag cleared --
the one point the library could not vouch for, arriving vouched for. Now the flag is part of the
path record and comes back with it, and each recording solve also writes onemidpathrecord
carrying the check itself: whether it passed, how many crossings it found, how many re-tracks it
spent. Read them with the newbertini.crossing_checks()and thecrossing_unresolvedcolumn
ofbertini.tracks(). A run with nomidpathrecord never reached the check -- a solve cut
short skips it -- which is deliberately distinguishable from a run that checked and found
nothing. Records written before this simply lack the field, and read as unflagged, which is all
they were ever able to say. - A configuration reference page: every setting there is, with its default (#406). There was
no single place that answered "what settings exist, and what do they default to?". The class
listings name fields but no defaults, the config classes are spread over three modules with no
index, and a handful of tracker settings are set by method and belong to no config struct at
all, so every "here are the configs" listing misses them by construction. The new page, in the top-level reference navigation, collects all of it and is
read out of the library when the docs are built: adding a config field, changing a default or
rewriting a field's docstring updates the page with no documentation change. A hand-maintained
table drifts from the code silently, which is what the issue was filed about. The settings with
no config struct are hand-written, in their own section, since no amount of introspecting config
classes will find a method. - Ctrl-C stops a solve. A solve releases the interpreter lock and runs on the calling
thread, so a keyboard interrupt was noted by CPython and ignored until the solve finished;
in a notebook the kernel was simply trapped, and killing the process was the only exit.
Now the solve installs a signal handler for its duration, every path being tracked notices
the request between steps, the solve unwinds cooperatively, andKeyboardInterruptis
raised -- with the solver left exactly as the stop found it. Finished paths stay finished
and readable; paths in flight are abandoned and readSuccessCode.ExternallyTerminated, a
value that had been in the enum, unproduced, for years; paths not yet begun stay
NeverStartedand are not recorded.solver.was_stopped_early()and
solver.num_paths_never_started()say what happened, and the midpath check is skipped on a
partial set rather than comparing paths that never ran. Because the records hold every
finished path, re-running the same solve recalls them and tracks only the rest: an
interrupt is resumable. Also programmatic:bertini.request_stop()from another thread
stops the running solve without raising. In C++,bertini::RequestStop(),
StopRequested(),ClearStopRequest()and the RAIIScopedStopRequest; a bare tracker
honours the request too, since it is the tracker that checks. Not applied to the MPI
solve. - Wall-clock budgets.
max_path_wall_clock_durationon the solver (seconds, 0 = none)
gives every path a budget; a path that has not finished when it runs out is abandoned
between steps withSuccessCode.WallClockLimitReached, stamped with where it got to, and
recorded with the budget that stopped it.max_solve_wall_clock_durationbudgets the whole
solve()call instead: once it runs out no further path starts and any in flight is
abandoned, and the solve reads exactly as if Ctrl-C had been pressed (was_stopped_early(),
ExternallyTerminated/NeverStarted, re-tracked on recall). The overrun is at most one
step. Both are plain numbers of seconds and both are off by default. A bare tracker
can be limited on its own:set_max_wall_clock_duration(seconds)/
clear_max_wall_clock_time()in Python,SetMaxWallClockTime(time_point)/
SetMaxWallClockDuration(duration)/ClearMaxWallClockTime()in C++. The primitive is a
deadline, not a duration, because an endgame issues hundreds of tracking calls for one path
and a per-call budget would restart with each. The budget is deliberately not part of the
run's identity: a 60 s and a 61 s run are the same ask. Wall-clock time is machine
dependent; the recorded stamp is the machine-independent account. - A tutorial on stopping a solve and budgeting paths ("Stopping a solve, and giving paths a
budget", under "Solver settings & multiprecision"): Ctrl-C andrequest_stop, the stamp an
abandoned path leaves, the per-path and whole-solve budgets, and how the recall policy reads
an abandonment. Doctested with budgets of a nanosecond and an hour, so it is the same on
every machine. - A recall policy, in its own config. What already-recorded work counts as done is now
RecordsConfig.recall, aRecallPolicy:Nothingtracks every path fresh (the old
recall = False),Completed(the default) reuses completed paths and re-tracks abandoned
ones -- except a path a wall-clock budget cut off, which is reused while the current budget
asks no more patience than the one that abandoned it, and re-tracked once the budget goes up
-- andEverythingreuses every recorded outcome as recorded. An interrupted path is always
re-tracked. A bool is still accepted (Trueis the default policy). It moved out of
ZeroDimConfigbecause the question is the same for every algorithm that records paths. - A path that did not succeed says where it got to. Its metadata now carries
latest_path_point, the point the tracker was at when it gave up (in the solver's internal
coordinates), withfinal_time_usedholding the matching time -- previously a failed path
reported a time of zero and no point. Every path also carriesnum_successful_stepsand
num_failed_steps, the predictor-corrector steps over the whole path, pre-endgame and
endgame together, so the cost of a path is visible without timing it; and
max_precision_usedis honest for fixed-precision solves too, where it read zero. The
stamp is recorded with the path and comes back on recall. Two corrections came with it: a
path whose endgame failed used to be handed the previous path's approximation as its
"solution" (the accessor was stale); its solution slot is now empty, and the stamp is where
its point lives. In C++ the tracker exposes the tally that made this possible:
ResetCumulativeStepCounts(),CumulativeSuccessfulSteps(),CumulativeFailedSteps(),
counting acrossTrackPathcalls (an endgame issues hundreds per path) until told to start
over. - A tutorial on tracking an analytic homotopy ("Tracking an analytic homotopy", under
"Doing things manually"). Sine has no degree, so no start system exists and no count bounds
its roots -- but a homotopy needs neither, only start points you choose. The page tracks
sin(x) = 1/2from five zeros of sine and checks the endpoints againstarcsin, shows why
the precision model has to be chosen rather than defaulted, and walks into a branch point at
sin(x) = 1where the power series endgame reports cycle number 2 -- correct, and explained
by Weierstrass preparation, which says an analytic family branches like an algebraic one near
a finite endpoint. Doctested, with a figure of the paths in the complex plane drawn from real
tracked data, and plain about what this does not give you: no solution count, no completeness,
and no theory for paths that run to infinity. The neighbouring tutorial has promised this
since it was written, and then changed the subject. - The endgames announce every sample point they compute along a path (
ComputedSamplePoint,
carrying the point and its time), from both the power series and the Cauchy endgame, and a
SampleSequenceCollectorobserver (C++ and Python,bertini.endgame.*.SampleSequenceCollector)
gathers them: the sequence of points on the path at shrinking times, kept apart from the
Cauchy loop's circle points and from the successive approximations of the root, with run
boundaries so one collector attached to a solver's endgame can tell one path from the next.
This is what lets a caller watch a quantity such as a Jacobian's singular values as a
function of distance to the root instead of judging it at one point. Every endgame run now
announcesInitializing; an adaptive endgame that needs a higher precision before its first
approximation recomputes its sample window at the new precision and announces
SamplesRecomputedAtHigherPrecision, so the collector drops the superseded samples as the
endgame does, and counts every precision increase (num_precision_increases). (#361, in part) - The records archive is reloadable. Every system and homotopy a solve records is stored as its
exact canonical encoding (the text its content digest is the hash of); there is now a reader for
that text:System.from_canonical(text)rebuilds a system from it,System.canonical_encoding()
produces it, andbertini.records.load_system(digest, directory)fetches and rebuilds an
archived one. The rebuilt system's content digest equals the archived one, and that equality is
checked on load. Classic (Bertini 1) text plays no part in persistence. (C++:
System::FromCanonicalEncoding,records::LoadSystem,node::DecodeCanonical.) SolutionMetaData.singular_values: the singular values of the target system's Jacobian at the
endpoint, largest first, at the endpoint's own precision -- the spectrumcondition_numberwas
already computed from and threw away. Published raw, archived with each path record and
restored on recall, so a caller can read a numerical rank at a tolerance of its own choosing;
no rank verdict is baked in, because no single tolerance suits every endpoint. (#409)SolutionMetaData.crossing_unresolved: true for a path that was flagged as crossing another at
the endgame boundary and whose crossing re-tracking did not resolve. Its success codes may
still readSuccess; this flag is the per-path form of the solver's "the affected solutions
may be wrong" warning, and it is recomputed on recall from the archived boundary data. Also a
column ofto_dataframe(). (#365)- Python bindings for two endgame accessors that already existed in C++ but were unreachable:
previous_approximation()andapproximate_error(), alongside the already-bound
final_approximation(). Together they give the pair of successive root approximations the
endgame's own convergence test compares, plus the infinity norm between them -- a second
sample of the root at a known, coarser accuracy, which is what lets a caller judge how a
derived quantity (the singular values of a Jacobian, say) behaves as the approximation
improves, rather than thresholding it at one point. - Multiprecision numbers plot (#389).
real_mpdata goes onto a matplotlib axis as it is,
including the calls that compute against plain floats before they draw (hist,barwith a
float width), which previously died with a numpy dtype promotion error. Importing bertini
registers a units converter with matplotlib -- whether matplotlib is imported before bertini or
long after -- so conversion tofloat64happens at the axis, which is the one place where
dropping digits is right, and nowhere else. Nothing about ordinary arithmetic changes: there is
still no common dtype betweenreal_mpandfloat64, deliberately, so nothing silently
downcasts. Image data, contour levels and marker sizes are cast explicitly with
.astype(float). New tutorial: "Plotting solutions and paths". See ADR-0064. - Every conversion out of a multiprecision number is defined (#389).
int_mpand
rational_mphad no__float__or__int__at all, so neither could be plotted, serialized or
handed to any library expecting a number;int_mpis now usable as a sequence index too.
int()of areal_mptruncates toward zero and keeps every digit before the point (a python
int is arbitrary precision, so nothing is lost), and refuses NaN and infinity the way python
does.bool()of anint_mpor arational_mpwasTruefor zero, because neither type had
a__bool__and python's "every object is true" default applied. - Printing a bertini object says what it is and where it has got to (#99). 106 of the 188
public classes printed<bertini._pybertini.tracking.AMPTracker object at 0x7f3c...>-- the
type you already knew and an address you cannot use. Each of them now describes itself:
<AMPTracker: homotopy in 2 variables, RKF45, tolerance 1e-05, adaptive precision at 30 digits, at t=0.31 after 47 steps>,<PrecisionIncreased: 30 -> 40 digits, at t=0.7>,
<PathDataCollector: 12 steps>,<PartialPivLU: 3x3>. A tracker's description is live, so
printing one inside an observer callback says where the path is rather than repeating its
settings. Configs and metadata keep theSteppingConfig(initial_step_size=...)form they
already had. A test walks every public class and fails if one prints an address, so the next
binding arrives with a description. See ADR-0065. - A solve says how far it has got (#359).
paths: 61%|██████ | 39/64 [00:41<00:26] 37 ok, 2 diverged, riding the path events the solver already emits. On by default, and shown only
when it would help: nothing is drawn for the first few seconds, nothing at all when stderr is
not a terminal, and only the manager rank draws under MPI -- so scripts, pipelines and test
runs are unaffected.show_progress=Falseon anysolveis the certain silence. Recalled
paths are reported separately (recalled 64 of 64 paths from the records), since a recalled
solve tracks nothing and has no progress to show. Redrawing is throttled to about two hundred
updates over the whole solve however many paths there are, which is what b1's
printpathprogresswas for. tqdm is now a dependency. PathCompletecarries how the path ended, as aSuccessCode, so a watcher can tally
outcomes as they arrive rather than reading metadata that a worker thread is still writing.
A solver also reportsnum_paths(), the count it is working through.
Changed
- Seed 0 is a seed (#475, ADR-0072).
bertini.set_random_seed(0)andSetGlobalSeed(0)
meant "draw a seed from entropy", so a script that set seed 0 to make a run reproducible got
a different run every time. 0 is now an ordinary seed, as in numpy and Python'srandom.
Entropy is asked for by omitting the seed:set_random_seed()orset_random_seed(None)in
Python,SetGlobalSeedFromEntropy()in C++.set_random_seednow returns the seed in
effect, so the run can be reproduced from it. The classic input format keeps Bertini 1's
meaning:randomseed: 0, its default, still draws from entropy in the command-line program.
Seed 0 is therefore the one value that does not carry between a Python script and a classic
input file. - The thread count is
BERTINI_NUM_THREADS, and it defaults to every available CPU.
b2 used to readOMP_NUM_THREADS, although it uses no OpenMP: its threads are its own
std::threadpool. That variable also sets the thread count of numpy's OpenBLAS, so one
setting tied the two libraries together, and pinning b2 to one thread for a reproducible run
pinned numpy's linear algebra as well. b2 now readsBERTINI_NUM_THREADSand ignores
OMP_NUM_THREADS. The order is the variable if set, then the solver'snum_threads, then
the number of CPUs the process may run on, which on Linux respects the affinity mask that
taskset, cpusets and a launcher's binding set. That last default is OpenMP's, so threaded
runs come without configuration.
MPI ranks change the most. A rank used one thread unlessOMP_NUM_THREADSwas set; it
now follows the same rule as a standalone solve,num_threadsincluded. How many CPUs a rank
may run on depends on how the launcher binds it, so several ranks on one machine can together
start more threads than the machine has cores. SetBERTINI_NUM_THREADSwhenever you run
more than one rank per machine. A script or job file that setOMP_NUM_THREADSfor b2
should setBERTINI_NUM_THREADSinstead. - An accuracy estimate names its coordinates (ADR-0069). A solution's metadata has two
accuracy estimates, both the distance between the endgame's last two approximations of the
root.accuracy_estimateis renamedaccuracy_estimate_internal_coords: it is in the
solver's internal coordinates (homogenized, on the patch), it is whatfinal_toleranceis
compared with, and it reads as a number of correct digits.
accuracy_estimate_user_coordskeeps its name: it is the absolute error in the units of
your variables, so a solution of order 1000 with six correct digits has about1e-3
there. The plain name read as the second and held the first. It is retired, not
reassigned: readingaccuracy_estimateraises an error that names both, so no code goes on
running with a number that changed meaning. The dataframe column and the records key are
renamed with it; records written under the earlier key still load. - Combining systems compares the variables (ADR-0068).
concatenate, the homotopy
builders (straight_line_homotopy, andMakeHomotopy/MakeMovingHomotopybeneath it) and
+on systems now all make one check: the two systems must be over the same variables, in
the same groups, in the same order. The homotopy builders and+used to compare counts
only, and evaluate their operands by position, so moving rows over(y, x)blended with a
system over(x, y)were accepted and evaluated with the coordinates exchanged:y - 3at
(x, y) = (7, 11)came out as 4. Such a combination is now refused, and the message names
both structures and says whether the order, the grouping or the variables differ. Code
that relied on matching by position has to put its variables in one order. - The tracker's own settings are a config (#457). The predictor, the tracking tolerance and
the path truncation threshold were bare members of the tracker, each with its own setter and
getter and no config struct. They were therefore absent fromget_settings/set_settings, from
the settings digest, and from the generated configuration reference;path_truncation_threshold
had no route through a solver at all, so the only way to change it was to reach for the tracker
and call a method. They aretracking::TrackerConfignow, sosolver.update(predictor=..., tracking_tolerance=..., path_truncation_threshold=...)works, a settings bundle carries them,
and the reference page lists them. The methods still work and read and write the config. The
tracker derives what it had been caching -- the digits implied by the tolerance, the predictor
object -- when it starts a path rather than when a setter is called, so a value set by any route
takes effect. In the same movefinal_tolerancelost its duplicate: it was a field of both the
solver'sTolerancesConfigand the endgame'sEndgameConfig, with the solver's pushed onto the
endgame at solve time, and it now lives only on the endgame, which is what achieves it. No field
name is shared by two configs any more. Settingfinal_toleranceon a solver still works and
reaches the endgame's config. Identity: both moves change the settings text a solve folds
in, sob2cfgenc/4's registry line was edited in place -- 4.0.0 is unreleased, which is exactly
the case ADR-0061 covers. - Encoding versions now count encodings, not commits: at most one per released version.
b2sysenc/<n>andb2cfgenc/<n>are part of the digest preimage, so moving one makes every
existing record a different ask -- and the old "append a line, never edit one" rule made the
number climb with development rather than with releases. The evidence was already in the
registry:b2cfgenc/1and/2were both minted while 3.0.0 was being developed and neither
ever shipped, so the number claimed three encodings existed when one had ever been written.
Now each registry line records the release it first shipped in, no two lines may claim the
same release, and while a release is unreleased its line is edited in place rather than
superseded; once it ships it is history and is never touched. The consequence for a user is
a promise the version can keep:b2sysenc/2means "the second encoding b2 has ever written",
and a record names the release that wrote it. The registry also gained a column for the
composition of the settings text -- which configs a solve folds in -- because the existing
hash could not see it:b2cfgenc/3and/4are byte-identical there,/4having been
exactly a composition change. (ADR-0061) - Path-crossing detection joined the ask: config encoding
b2cfgenc/4.MidPathConfig
decides when two paths at the endgame boundary count as the same point, and so decides which
paths get re-tracked and what the solve returns -- but it was not in the settings text, so two
solves that disagreed aboutsame_point_tolerancewere the same ask and would recall each
other's results. It is in the text now, appended last, since the order is extended by
appending and never by reordering. Every settings digest therefore changes: runs recorded
by an earlier version are a different ask now and will be recomputed rather than recalled.
The gap that let this sit unnoticed is closed too. The golden fixture and the version registry
both watch the encoders -- what one config struct turns into -- and neither watched the
composition, which configs a solver folds into its settings text. A new test pins that list in
order, so adding, removing or reordering a config is a named failure rather than a silent
change of identity. - One homotopy builder, named for the mathematics:
straight_line_homotopy(#371). It
replaces bothblend_homotopyandcoefficient_parameter_homotopy, which built the same
object and differed only in gamma. "Blend" named the implementation, a blend block, rather
than the mathematics; and a coefficient-parameter homotopy is not a different construction, it
is this one with gamma fixed at 1, so the second name claimed a specialization it did not have.
straight_line_homotopy(target, start, *, path_variable='t', gamma=None)is
(1-t)*target + gamma*t*start, with the gamma trick by default. Both old names are gone:
readblend_homotopy(a, b)asstraight_line_homotopy(a, b), and
coefficient_parameter_homotopy(a, b)asstraight_line_homotopy(a, b, gamma=1), where the
gamma=1is now visible rather than hidden in the choice of function.gammaalso accepts a
plain int, sogamma=1needs noIntegerwrapper. - The adaptive-precision error bounds are named after what they bound. On
AMPConfig,Phiis nowjacobian_eval_error_bound,Psiis now
function_eval_error_bound, andepsilonis nowlinear_solve_error_bound-- in C++ and
in Python (phi,psiandepsilonas attribute names are gone).SetPhiPsiFromBounds
isSetErrorBoundsFromDegreeAndCoefficient(set_error_bounds_from_degree_and_coefficient
in Python) andSetBoundsAndEpsilonFromisSetBoundsFrom(set_bounds_from). A Greek
letter told a caller nothing, which matters more now that a refusal invites them to set
these values by hand. No digest moved: the canonical encoding keeps the old spellings,
because that text is a preimage rather than presentation, sob2cfgencis untouched and
every existing record still recalls. - Adaptive precision refuses a system that is not polynomial, instead of miscalibrating.
Its error bounds are derived from the system's degree, which such a system does not have,
and the derivation used to produce a plausible-looking Jacobian bound and a negative
function bound; every path then died before the endgame with
FailedToSelectPrecisionAndStepsize, after precision had climbed to 290 bits. Tracking
an analytic homotopy at fixed precision was, and remains, fine -- the refusal names that
way out, and the other one: supply the two evaluation error bounds yourself, which
bertini.HomotopySolvernow accepts asamp_config=. The open question of what those
bounds should be for an analytic system is issue #439. - Printing is a family of dialects, one per audience (ADR-0059).
str(node)and
str(system)are the Python spelling: powers as**.repr(node)is the exact Python
spelling:evalof it in thebertininamespace rebuilds an equal node at full precision
(real_mp('digits', precision),Complex('re', 'im', precision),Rational('p/q'); integers
and values a Python literal holds exactly stay bare).node.to_classic(),
System.to_classic_input()and the CLI write Bertini 1's spelling:^, and a complex
constant as(re+im*I)-- the only complex form Bertini 1 reads. The(re,im)pair form is
gone from every output, and so are the two Python shims that patched around it (the^to
**character replace inrepr, the(re,im)regex inparse.system).real_mp(text, precision)andComplex(re, im, precision)construct a value at a chosen precision. - The system encoding version is
b2sysenc/2. Canonicalization breaks multidegree ties
between operands on the canonical encoding instead of on printed text, and the encoder writes
operands in that order; the encoding also carries which coordinates a system has declared
auxiliary (#403). Both changes land under the one version, which is the point of ADR-0061:
a release gets one encoding, not one per change. Records written by earlier versions carry
b2sysenc/1and are not recalled; the "records read forever" promise is withdrawn until the
identity of the algorithm itself is part of a record's ask (#420). - The default endgame is the power series endgame, matching Bertini 1's documented default
(EndgameNum: 1), at every choice point: the configuration default (so the CLI and a classic
input withoutendgamenum), and the Python factoriesZeroDimSolver,HomotopySolver,
user_homotopy,parameter_sweepandbertini.solve. Measured on a regeneration workload,
the Cauchy default cost 190 s where power series takes 2.5 s, because slowly diverging paths
are a Cauchy-specific pathology. Cauchy remains available by explicit request
(endgamenum: 2,endgame='cauchy'). A solve that relied on the default is now a different
computation, so its records are new asks rather than recalls. See ADR-0058.
Fixed
- A threaded solve gives the same bits as a serial one, and a path no longer depends on the
paths before it (#378, ADR-0071). Each path's random draws were already deterministic,
but state that is not random flowed from one path into the next on a reused tracker or
endgame. Under a thread pool the scheduler chose each thread's predecessors, so a seeded
threaded solve differed from run to run in step counts, precision and the last digits of
its endpoints, and algorithms built on those endpoints differed with them. A serial solve
depended on path order. There were five sources:- an adaptive track built its first step at the precision the previous track ended in;
- a drop to double left the step size and the time at the old multiple precision;
- the condition-number probe was rounded in place at each change of precision;
- the endgame's c/k probe was drawn once per endgame object, by whichever path first needed
it, or redrawn mid-path after an escalation; - an endgame run in double left an earlier run's multiprecision times in place, so
final_time_usedreported another path's last time.
Now a solve at any thread count, under MPI or not, is bit-identical path by path to a
serial solve with the same seed: every endpoint and every metadata field but the
wall-clock time. A tracker or endgame driven by hand gives a track the same result as a
fresh one would. Results differ from 4.0.0.dev1 in the last bits and, occasionally, in step
counts.
max_precision_usedis the highest precision a path used, over all of its tracking
(ADR-0071). The endgame tracks a path in many calls, and the solver's record started afresh
with every one, so a precision raised in an earlier endgame sub-track and lowered before the
last went unreported: seeded cyclic-5 had paths that reported 30 digits after tracking at 40.
The tracker'sFirstPrecisionRecorderandMinMaxPrecisionRecordernow record each track
from its very start, the start-point refinement included, and keep recording every track
once attached.FirstPrecisionRecorderused to unsubscribe at its first increase and
report that track ever after, and a track whose initialization failed was reported with the
previous track's values. A newPathPrecisionRecorderrecords a whole path.- A copied or unpickled system combines with its original (ADR-0068).
copy.deepcopy,
copy.copyandpicklego through an archive, and loading from one built variables
outside the variable factory: a copy was over fresh variables with the same names, and
concatenate(system, copy.deepcopy(other))was refused for "differing variable
orderings". ASystemand aSlicenow re-intern what they hold as the last step of
loading, so a loaded system is over the same variables as every other system that names
them.straight_line_homotopy(..., fixed=...)accepts deep-copied operands as a result;
it had refused what the builder beneath it accepted. - A moved or assigned system keeps its auxiliary coordinates.
System'sswap, which
move construction and assignment go through, left out the auxiliary declarations, so a
system that was moved or assigned was judged on every coordinate again. It did not show
while every function returning aSystemhad a single return statement, because the
compiler elided the move. - The Cauchy endgame honours the security ceiling as the power series endgame does. At
security level 0, two consecutive endpoint approximations whose largest coordinate is above
max_normtruncate a path withSecurityMaxNormReached. The power series endgame asks
that after every approximation; the Cauchy endgame tested acceptance first, so a path that
converged to a finite point above the ceiling came backSuccessfrom Cauchy and truncated
from power series -- forx^2 = 1e8, y = 2xat the default ceiling of 1e4, two solutions
under one endgame and none under the other. Cauchy now asks security first, and never
accepts an approximation above the ceiling. Its count still runs over rounds in the
operating zone only, where the Cauchy mean can be trusted. The two endgames differ in how
they estimate the root and in nothing else (ADR-0067). A solve whose solutions lie above
max_normneeds the ceiling raised (solver.update(max_norm=...)) or security level 1,
under either endgame. TheSecurityConfig.leveldocstring said the opposite of what the
level does, and is corrected. - A wide real random orthonormal matrix has distinct columns again. The faster
factorization from #401 (below) QR-factors a tall seed matrix, and for a real request that
seed was a matrix of units, which for real numbers means signs. A tall matrix of signs has
only2^thindistinct rows, so the resultingrows x colsmatrix had at most2^rows
distinct columns: a3 x 5real draw had 3, an8 x 4908one had 256, and randomizing an
overdetermined deflated system down to square withrandom_matrix(n, m, real=True)produced
a singular square system at a point where the deflated Jacobian had full rank, so Newton
could not converge there. The real seed is now a continuous draw on[-1, 1]; the QR still
launders it into an orthonormal matrix, now a generic one. Complex draws are unchanged.
Real orthonormal draws --random_matrix(..., real=True)andSlice.random_real-- differ
from before for the same seed, so a record of a solve that used one is a new ask. solutions(group=...)and its siblings no longer fail on a path without an endpoint.
all_solutions()holds an empty placeholder for a path that went to infinity or failed, and
projecting one onto a variable group raisedCoordinatesOfGroup: point is shorter than the system's variable structure implies. The placeholder is passed through empty, so the list
keeps one entry per path, aligned withsolution_metadata().- A fast parameter sweep no longer dies after 25 recorded solves (ADR-0066). Every
recorded solve that found no other solver attached to its records directory started a new
session, and a session claims a history file named for the current second, the process id,
and one of 25 suffixes.parameter_sweepruns its solves one after another, so each
started its own session, and the 26th solve within a second failed with
OutputDirectory: could not claim a session history file. A records session now lasts as
long as the process: however many solves a process records into a directory, they share one
history file (including the first solve into the default relativebertini_output, which
used to get a session of its own;records_path()now reports that directory's absolute
path). A deleted directory or session file is recreated rather than written into,
a forked child starts its own session, and neither a long sweep nor a process recording
into many directories accumulates open files: a directory's files close as soon as no solve
is using it, so on Windows a finished solve's records directory can be deleted while the
process is still running. - Four ways to crash the interpreter from python, all closed (#389).
int()of areal_mp
or acomplex_mpsegfaulted, andbyteswap()on either -- as a scalar or across a whole array
-- aborted inside mpfr. Both types become subclasses ofnumpy.genericwhen their dtypes are
registered, and the inherited implementations reach for machinery a user dtype does not have: a
cast function toint64that was never registered, and a scalar payload at an offset where
Boost.Python does not keep one. All four now convert or raise. A regression test exercises
every inheritednumpy.genericmember of both types in a subprocess, so a future one cannot
take the test suite down with it. The array-levelbyteswapwas eigenpy'scopyswap
dereferencing a nullsrcon an in-place swap request, now guarded on our side beside the other
Harden*slot repairs. - Drawing a multiprecision complex array no longer silently draws the wrong picture (#389).
numpy's.realand.imagon an array of a user complex dtype return the array itself and an
array of zeros, soscatter(points.real, points.imag)-- the usual spelling -- put every point
on the x axis, with no error. numpy offers no hook to correct that, so complex data handed to a
matplotlib axis now raises aTypeErrornamingbertini.real/bertini.imaginstead. The
refusal catches exactly the wrong spelling, because.realof acomplex_mparray is still
complex_mp. ASolutionis unaffected: it overrides.real/.imagcorrectly. - A tracker's step counters are zeroed at construction (#99).
ResetCountersBaseruns at
the top ofTrackPath, so until a path had been trackednum_total_steps_taken()read two
uninitialized members -- on a fresh tracker it returned whatever had been in that memory
(1093431419, in the case that found it). The two cumulative counters, added later, already
had initializers; the four per-call ones now do too. - A variable group prints its variables (#99).
reprof aVariableGroupprinted the
addresses of the variables it held --[0xae8010b19520, 0xae8010b100f0]-- because the bound
container streams its elements in C++ and an element is a pointer to a node. It reads
VariableGroup([x, y])now, as does a list of them. - A
SolveResultnames only what it has (#99). With recording off there is no run and no
directory, and the repr said so asSolveResult(4 solutions, run , 0 recalled, records at None), which reads like something went wrong. - Linear-product start points no longer compute a thousand digits to keep thirty (#351). Both
TotalDegreeLinearProductandMHomogeneousproduce each start point by solving an n-by-n
linear system whose coefficients come from masters stored atMaxPrecisionAllowed-- a thousand
digits, so that the masters are precision-faithful. Boost's variable-precision backend computes
at its operands' precision, so the whole LU ran at a thousand digits and the rounding at the end
of the routine then discarded every digit past the working precision. The masters now enter the
solve already at the working precision; they are themselves untouched, so asking for the same
start point at a higher precision still refines toward the same point. Measured over three
passes of every start point: three variables of degree three, 0.015s to 0.004s; four variables
of degree two, 0.014s to 0.002s. The tell was that the old timings did not depend on the
precision asked for -- the cost was set by the masters' storage precision, not by the user's
choice. Same shape as #346, which fixed the binomial start system. - Multiprecision values in an object-dtype numpy array reach the solver (#348).
np.arrayover
complex_mpvalues infers the registeredcomplex_mpdtype and the native converter takes it,
but an array built any other way --dtype=object, or grown by assignment, or sliced out of a
larger object array -- holds the same values behind a dtype no overload matches. Start points
were already rebuilt at the Python seam (#347);System.evalandTracker.track_pathwere not,
and answered a caller with a dump of C++ Eigen signatures. Both now take an object array of
numbers, and a plain list, exactly as start points already did; the conversion lives in one place
rather than in each seam that owns one. An object array of anything else is still refused rather
than reinterpreted. - One homotopy builder, and it hands back both ends (#382).
moving_homotopyis gone;
straight_line_homotopy(target, start, fixed=None)does both jobs, because they were always one
construction -- with nofixedthe whole system deforms, and with it only the rest does, the held
rows evaluated once rather than blended and carrying no path-variable dependence at all. The
moving rows may be given as complete systems, as aSlice, or as a plain list of functions when
fixedsupplies the variable structure.
It returns aStraightLineHomotopy-- an inert record with.homotopy,.target,.start,
.fixed,.gammaand.path_variable-- rather than a bare System, so neither end system is
yours to assemble. That is a correctness matter rather than a convenience: the rows must come
held-first, and nothing would have caught it if they had not..startis the system whose
solutions are the start points,.targetis what the answers satisfy, and.gammais the
coefficient actually used, random default included, so a path can be reproduced. Pass the record
straight toHomotopySolverorbertini.solve(homotopy=...)and the target comes with it. - The homotopy builder projectivizes by default (#382).
straight_line_homotopynow
homogenizes and patches the systems it is given before combining them, so
a homotopy is tracked over projective coordinates and infinity is an ordinary place a path can
reach rather than somewhere it runs off to. That is whatZeroDimSolverhas always done with
the systems it builds for itself, and the reason the option lives on the builders rather than on
the solver: once a blend block exists its operand systems are fixed and cannot be homogenized,
so the moment a homotopy is built is the only moment this can happen. The operands are converted
in place, which is what keeps the target you hand the solver in the same coordinates as the
homotopy; pass clones to keep your originals, orprojectivize=Falseto build the homotopy
affinely as written -- the right choice when the affine coordinates are the point, as in all-real
tracking.HomotopySolverlifts start points written in your own coordinates onto the patch for
you, so an affine solve's solutions feed a projective homotopy directly. A family that cannot be
written projectively at all -- a products-of-linears block over more than one affine group -- is
built affinely rather than half-converted. - Combining systems that describe points differently is refused (#382). A homotopy whose two
ends are one projective system and one affine one deforms between points that do not correspond,
and nothing downstream notices: the shapes agree, the tracking runs, the answers are wrong. The
variable-structure checkSystem+=Systemalready made -- variable count, homogenizing-variable
count, variable-group count, and a common patch where both are patched -- is now a named function
thatMakeHomotopyandMakeMovingHomotopymake too, so every caller gets it rather than only
the addition operator. A projective/affine mix is diagnosed as such rather than reported as a
variable count that happens to differ. - A patched system's patch rows are reachable through
function(i)(#464).num_functions()
counts the rows an evaluation returns, patch rows included;function(i)returned only the
functions as authored, so the two disagreed by exactly the number of patches and the obvious loop
overrange(num_functions())raised on the last index. Once a system is patched the patch is
one of its functions -- a row of the vectorevalreturns and a row of the Jacobian -- so it is
reachable there now, and the pair agrees.functions()still returns the equations as authored
and nothing else, so copying them into another system copies equations rather than somebody
else's choice of patch;get_functions()is the whole evaluated set. (The Python docstring for
num_functionshad also said it excluded patches while being bound to the count that includes
them.) - Homogenizing a system that contains a blend block is refused (#463). A blend's operands are
fixed when it is built, so its own homogenization is a no-op; converting the system's other
blocks around it left the parts disagreeing about how many variables there were. The system
reported the new count, evaluated against the old, and said nothing until the first evaluation
failed with a message about variable counts that did not name the mistake. It now refuses, and
says that the operands must be homogenized before the homotopy is built. - The first start point after a precision change is no longer short of digits (#461). Rescaling
a point onto a patch read the patch's working coefficients without first bringing them to the
precision of the point. Every other evaluable path self-aligns that way (ADR-0057); this one
demanded that the caller align it beforehand, in an assertion that a release build compiles away.
So a rescale following an evaluation at a lower precision -- which is exactly what generating the
second start point of a solve does -- returned a point reporting the requested precision while
carrying only the older one's correct digits. At 120 digits the point was short by 29, and
nothing downstream could tell:Precision()reported 120, and only a residual check revealed it.
Adaptive precision moves the working precision during a solve, so this was reachable in ordinary
use, not only in a test. InEGOperatingZonemeans the same thing in both endgames (#402). The event says the path
has reached the asymptotic regime, where the Puiseux model the endgame is built on dominates --
which is what makes the samples usable quantitatively, for anyone fitting a power law against
|t|to see what vanishes at the root. The Cauchy endgame emitted it once, on a real test: its
c/k estimates settling. The power series endgame emitted it at the end of every successful
advance, with no test at all, so there it meant "advanced", and a consumer that trusted it got a
silently wrong answer under one flavor and a right one under the other. Both run the same test
now. It reads only the geometrically spaced approach samples, which every flavor already keeps
-- the power series endgame'ssamples_and the Cauchy endgame'spseg_samples_are the same
window under two names -- so it lives on the base endgame, along with the fixed probe direction
that keeps consecutive estimates comparable.minimum_for_c_over_k_stabilizationand
num_needed_for_stabilizationmove fromCauchyConfigtoEndgameConfigwith it, which is
where a setting every endgame reads belongs; scripts that set them on the Cauchy config need the
one-line change. Every config digest moves, under the existingb2cfgenc/4rather than a new
version, per ADR-0061.- Four settings had no default at all.
SharpeningConfig.sharpendigitsand
RegenerationConfig's three slice tolerances were declared without initializers, so a
default-constructed config held indeterminate values and reading one was undefined behaviour --
and there was no default to document, which is how the omission surfaced while generating the
configuration reference. They are initialized now: sharpening off (0, Bertini 1's default),
and the slice-moving tolerances matching the main tracking tolerances they shadow, which is
where Bertini 1 takes its ownSliceTol*defaults from. Nothing computes differently: the
classic parser was the only thing that ever set them, and regeneration is scaffolding. - The classic parser reports two mistakes it used to let through (#441). A name declared and
never defined --function f, g;with onlyfdefined -- reached astd::map::atlookup and
surfaced asmap::at(anIndexErrorin Python), naming neither the forgotten name nor the
problem; it now says which name was declared and never defined, and what it was declared as.
A secondpathvariabledeclaration was accepted, quietly overwriting the first; a system has
exactly one path variable, so the second declaration is now refused.System::AddPathVariable
stays permissive, so a caller building a system programmatically may still change its mind --
the enforcement is on the declaration, in the input file. - Every setting a solve uses is settable through the solver's own settings surface (#364). The
tracker's (max_step_size, the Newton counts, the precision configs) and the endgame's
(num_sample_points,sample_factor, the security and flavour settings) used to be reachable
only by fetching the sub-object and round-tripping its config --solver.get_endgame() .get_endgame_settings(), modify, set back -- which is easy to get wrong and unreachable from
any code path that only carries a settings dict. Nowsolver.update(num_sample_points=6, max_step_size="0.05"),solve(**settings),configure(),get_settings()and
set_settings()all reach them, routed to whichever object holds each field. One field name
is shared by two configs --final_tolerance, on the solver's tolerances and on the endgame --
and the solver's own keeps winning, with the endgame's reachable as
configure(endgame={'final_tolerance': ...}). Endgames also gained the config surface
trackers and solvers already had (get_config,set_config,config_types, and with them
update/configure/get_settings). - A misspelled setting suggests the one you meant. A settings call names its fields as keywords,
so a typo is silent where it is written and the error message is the only place it can be
caught; listing the valid names says what exists, not what was meant, and those lists run to
dozens of entries.solver.update(final_tolerence=...)now answersDid you mean 'final_tolerance'?, for fields, for config names, and whether the field belongs to the solver,
its tracker or its endgame. Nothing close by means no guess, and the valid names are still
listed either way. - The last settings that no caller could name are nameable (#364).
same_point_tolerance, which
governs path-crossing detection, was held only by the midpath checker and so appeared in no
config list the solver publishes; the solver holds it now and pushes it into the checker at the
start of each solve, which makes it settable like anything else and gives the setting one home
rather than two.EndgameConfig.refine_when_increasing_precision, andZeroDimConfig's
initial_ambient_precisionandpath_variable_name, existed in C++ but had never been exported
to Python at all. The path variable's name is read when a solver builds its homotopy, so it
belongs on a config you hand to a constructor; its docstring says so, since setting it on a
solver that already built one would leave the two disagreeing. - An exact-rational setting takes every exact spelling (#364).
sample_factoris a rational,
and accepted only arational_mp: a string went to the float parser and came back with
Unable to parse string "1/10" as a valid floating point number, which is a confusing thing to
be told about a field that is not a float. It now takes'1/10'and'0.1'-- the same
number, both exact, since a decimal is read as the rational it denotes and never as a rounded
binary float -- and anint, afractions.Fraction, or arational_mp. A Python float is
still refused, now saying why. Rationals are also picklable now, so a settings bundle
containing one still travels. - A degree that does not exist is refused rather than laundered into a number. A function
that is not a polynomial reports degree -1, which is the right answer and a catastrophic
operand, and four places treated it as one.System::DegreeBound()took a maximum, so the
sentinel vanished behind any function of positive degree -- a system of one polynomial and
one sine reported a degree bound of 2 and said nothing; it now refuses.System::Randomize
compensates differing degrees with powers of a homogenizing variable, and its target degree,
starting at zero, clamped the sentinel to a definite claim of degree zero, after which a
transcendental function was quietly multiplied by one such power; it now refuses, and
whether squaring up means anything for an analytic system is issue #440.BlendBlockdid
the same clamping, so a homotopy onto a sine reported itself as a constant; it now
propagates the sentinel. System::IsPolynomial()looked only at the declared variable groups, never at the
ungrouped variables, and a variable outside every group has degree 0 with respect to every
group. Sosin(t)*x^2withtungrouped reported degree 2 and claimed to be polynomial,
and a system with no variable groups at all was vacuously polynomial whatever it contained.
Every guard built on the check inherited the hole, including the zero-dimensional solver's
refusal of non-polynomial systems. Removing the ungrouped-variable concept entirely is
issue #442, targeted at 3.6.- A power with a non-integer exponent and no variable in it --
5^(1/2), which is how Bertini 1
input spells a square root -- answered "not homogeneous" while reporting degree 0. A system
with such a constant among its coefficients (the Barth sextic with the golden ratio written
as(5^(1/2)+1)/2) therefore homogenized to nothing andAutoPatch()refused the result
with "requesting to AutoPatch a system which is not homogenized". A variable-free power is a
constant and is now homogeneous whatever its exponent, in agreement with its degree. A
table-driven test pins the variable-free form of every operator (sqrt,exp,log, the
trigonometric functions, rational powers, and compositions of them) as degree 0, polynomial
and homogeneous, both on its own and as a coefficient of a system that must homogenize and
patch. (#419) - Negating a sum inflated its degree with respect to a variable group:
NegateOperator
inheritedUnaryOperator's group degree, which summed the per-variable degrees -- correct
only for a single monomial -- so-(x^2+y^2)reported degree 4, andSystem::DegreeBound(),
which sizes adaptive precision, followed it. This is the defect #397 found in
PowerOperator, in the other class that inherited the sum. Negation now passes its
operand's degree and multidegree through, and the non-polynomial rule (a variable-free
operand makes a constant; anything else is not a polynomial) lives once inUnaryOperator
instead of in four identical copies insqrt,exp,logand the trigonometric operators. - The tracker's path-truncation check measured the 2-norm of the point while the endgame's
Security::max_normcheck and the post-processingendpoint_finite_thresholdmeasure the
infinity norm (the largest coordinate), so the three thresholds did not measure the same
quantity: a path whose coordinates all stayed underpath_truncation_thresholdwas truncated
oncesqrt(n)carried its 2-norm over the line. The tracker now uses the infinity norm too,
as Bertini 1 does. The never-incrementednum_total_steps_taken_member is gone
(NumTotalStepsTaken()already computed the sum). (#404) RandomConjugateOrthonormalMatrix(rows, cols)factored a square matrix of the larger
dimension and truncated it, so an8 x 4908randomization matrix for an isosingular deflation
became a4908 x 4908multiprecision factorization that did not finish in 900 s. It now
factors a matrix sized to the request (the longer side by the shorter, transposed when the
shape is wide): the same distribution, at O(max * min^2) instead of O(max^3) -- milliseconds.
Square requests draw and factor exactly as before; non-square ones consume fewer random draws
and so differ from the old recipe for the same seed. (#401)to_classic_input()left out thepathvariable t;declaration, so the classic text of a
homotopy did not parse back: the functions used a variable the file never declared. A
homotopy is a system too; the declaration is now emitted with the variable groups, and a
homotopy round-trips through the classic writer and parser. (#366)- An affine products-of-linears block (
add_products_of_linears, the shape of a regeneration
deformation) did not homogenize: itsHomogenizewas a no-op written for the m-homogeneous
start system's already-homogeneous form, and itsIsHomogeneousalways answered true, so a
homogenized system kept an affine block with the wrong variable count and could neither be
expanded to nodes ("variable count mismatch") nor tracked projectively. The block now folds
each factor's constant column onto the homogenizing variable, exactly as the linear-forms
block does, and reports homogeneity from its shape. (#376) - Four Python-boundary defects where a caller error killed the interpreter or came back as a raw
Boost.Python error, now Python exceptions that name the problem: a start point with the wrong
number of coordinates, or a homotopy with more functions than variables, handed to
HomotopySolveraborted the process from inside the tracker (ValueErrorat construction;
#369, #383, #386); a non-square matrix, or a right-hand side of the wrong length, handed to
bertini.linalg.solvecorrupted the heap inside Eigen's LU (numpy.linalg.LinAlgError, as the
double path already raised, and the native layer refuses too; #390);System.evaldid not
accept a plain list as the point (#367); aSlicewas not accepted bySystem.addor by
moving_homotopywhere a system of linear forms was meant (#372, #381). - Two solver-configuration traps (#392):
get_config()refused the very namesconfig_names()
lists (it takes them now, alongside the class); andfinal_toleranceset directly on the
endgame was silently reverted at everysolve()by the solver's own copy. The solver's value
now flows into the endgame at setup and whenever the solver's value changes, so whichever was
set last wins and nothing is reverted without a word. - Building a large expression no longer costs its expansion (the second half of #417, closing
it): canonicalization broke multidegree ties by printing the operands, and the printer walks
the tree -- a 46-node graph printed as 196 KB at every level. Ties are now broken on the
canonical encoding, which is linear in the graph, computed only when two operands tie. - Classic input with Bertini 1 comments (
%to the end of the line) is accepted by every
parse entry point (System(text),parse.system, the CLI), including a comment that
mentionsINPUTorEND;: comments are removed in C++ before the file wrappers are
unwrapped and the grammar runs. The Python text-scanning shim that looked for the INPUT
section is gone. (#407) - Asking for a random slice with more linear forms than variables (
Slice.random_complex(vars, dim)withdim > len(vars), and the real and through-point forms alike) silently produced
dependent rows; it is now aValueError(C++std::invalid_argument) that says so. (#380) MakeMovingHomotopyno longer rejects a valid deformation whose two moving endpoints merely
print the same. Both of its guards (a fixed function duplicated in the moving rows, and a
moving row identical at both endpoints) compared functions viaoperator<<, whose default
stream precision is 6 significant digits -- so two genuinely different rows agreeing to 6
digits compared equal and the homotopy was refused with a message asserting the endpoints were
the same row. The collision is ~1e-6 relative, so it bit at every coordinate scale. Identity
is now decided onnode::CanonicalEncoding-- the exact-value encoding the content digests are
built on (ADR-0042) -- whileoperator<<is still used for the human-readable message text.
Found by a surface cell decomposition whose slice values were 1.9e-5 apart at a magnitude of
2409, and reproduced at order one (0.162749 vs 0.1627491). (#391)- The power series endgame left
previous_approximation_holding a COPY of
final_approximation_after every successful run. It assigned the two at the bottom of its
convergence loop while testing the loop condition at the top, so the assignment ran one final
time on the way out. The Cauchy endgame never had this -- it returns from its acceptance gate
before the corresponding assignment -- so the two endgames disagreed about their own post-run
state. Power series now matches Cauchy. Consequences:PreviousApproximation()is now a
genuine predecessor for both endgames, andZeroDimSolver's reported
accuracy_estimate_user_coords-- computed as the distance between the final approximation and
the previous one -- is no longer identically zero for power-series solves, which had it
reporting an exactly-perfect accuracy for every such path. EndgameBase::approximate_error_was left uninitialized, soApproximateError()read an
indeterminate value before any run. Now initialized to infinity, which is the only safe
sentinel: the convergence gates compare it in both directions, and NaN -- which loses every
relational comparison -- would make the power series loop'serror > tolerancetest false and
skip the loop entirely, reporting instant success.