Release 0.8.4 "Commands" - Optimizations and equation fixups #1328
c3d
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This release focuses on improving the solver support for the equation library, fixing various bugs found during development of that equation library, and optimizing the garbage collector. It also introduces configurable keyboard layouts.
Features
ui: The keyboard layout is now configured by a a
config/[keymap].48kfile that describes which commands are assigned to which key by default. A new setup entry,Load keymap, lets you change the keyboard layout.ui: Add four predefined keyboard layouts:
db48x.48kis a key layout that is more logical and effective for DB48x, See thread.legacy.48kis the layout used for earlier releases, which swaps theexpandlog10keys relative to the DM42 in42style.48k.42style.48kkeeps key layout as close as possible to the DM42true42.48kis identical to42style.48k, but the simulator shows an image of the DM42 keyboard.Add various commands such as
Editto directly perform editing operations in a programmatic way.units: Implement non-proportional unit conversions, notably temperature conversions like
°Fto°C. The underlying engine allows arbitrary conversions, including non-linear ones, which would be useful for example for the Dalton temperature scale. However, that capability is not presently used.units: Convert temperatures to
Kin multiplication and division. For example, when computingⒸR*T, we need the temperatureTto be inKeven if given in Celsius or Farenheit initially.solver: Report underlying evaluation error. For example, if the expression being evaluated reports
Inconsistent units, this is what the solver will return instead ofNo solution?.ui: Add configurable interval for busy cursor drawing,
BusyIndicatorRefresh. The default is now 50ms, which refreshes the busy cursor more frequently than before, and may be detrimental to battery life and performance. You can restore the previous behaviour by setting a higher value, e.g. 1000ms.performance: Automatic cleanup of temporaries to minimize the number of garbage collection occurences. When a complex operation such as
expis performed, there are a number of intermediate results that require storage, and were previously only cleaned up by the garbage collector. They are now automatically cleaned up before the function returns. The same optimization applies to intermediate graphics while rendering equations, notably on the stack. This delivers significant performance improvements for long-running operations: the "floating-point sum test is now about 20% faster on SwissMicros calculators.commands: Add
GCStatscommand to show garbage collector statistics.Allow
CustomMenuto contain the name of a menu, or a program that builds the menu dynamically. An example is shown in theRPLdirectory of the Demo file.Allow
CustomMenuto define "vertical" menus, i.e. menus where the items are stacked on top of one another.Bug fixes
Fix functions taking real-like unit input. For example,
atan(1_cm/1_m)now computes correctly.solver: Do not solve system of equations using existing values. The multiple equation solver would incorrectly consider existing values in variables to check if an equation could be used for solving. The heuristic now picks up the equation that requires the smallest number of unknown variables among the available equations.
Parse
x!as factorial ofxand not as ax!symbol. The incorrect parsing was due to an ambiguity in the HP48 parser that was resolved in the HP50G. DB48X now behaves like the HP50G and does not allow!to appear at the end of a name.Do not enter the debugger if
DebugOnErroris set while evaluating aniferrstatement. The assumption is that if you try to catch anerror, you do not intend to debug the code being tested for an error. If this is not the desired behaviour, then an explicit
DebugOnErrorshould be inserted in the body ofiferr.Various unit-related fixes in the equation library.
Ensure that we don't execute auto-completed catalog commands twice. The recent change that added the auto-completed command to the command-line history also caused the command to be executed on the command-line before being evaluated again from the key.
Avoid a rare crash when an equation was too big to be rendered graphically and a garbage collection cycle occurred between graphic rendering and text rendering.
Do not emit error message from
Vec→for vectors containing units. The incorrect error was introduced by the logic detecting polar, cylindrical or spherical vectors.Fixed
atan2special cases to always generate the correct angle. Cases whereatan2would generate an exact result would usually result in the wrong angle unit scaling being applied.Fixed parsing of
tan⁻¹in expressions.units: Skip the
=Cyclesection for unit definitions. This was causing incorrect unit conversion errors for users who had added common units in the=Cyclesection of theirconfig/units.csvfile.The user-defined units menu no longer list all the built-in units after the user-defined ones.
Add a missing
sqrtin theRelativisticKineticEnergysample code, and do not compute the kinetic energies for negative values.Alias
keysis forKeyMap, notHeader. Fix typo in identifiers table.Avoid a crash in
RandomMatrixwhen hardware floating-point is enabled, due to an incorrect conversion to integer. As a side effect, fixed a couple of minor issues in the conversion to integer values from decimal or binary floating-point values.Fix bogus
Bad argument typemessage forV→when the number of elements was not 2 or 3.Fix crash when dividing a matrix by a non-invertible matrix.
Fix crash displaying non-normal hardware floating-point values.
Fix crash in vector operations that cause errors, e.g.
[1][0] /.Parse
ubasealgebraic expressions, e.g.ubase(1_km), as well as other function-like commands such assize.Accept numerical values in
ubaseand leave them as is.Adjust the "next step" computation in the solver to minimize the complexity of conversions and remove unit ambiguity for temperatures.
Rewrite the Heat Transfer equations to clarify temperature unit used in the computation. Specifically, avoid having a
ΔTin a multiplication, where the value would be incorrectly converted toK.Fix a problem when a garbage collection while parsing a fraction could cause a large fraction of the subsequent program to be skipped. This normally led to anomalous
Inconsistent unitsmessages when this caused a unit such as254/10_mmforinto be incorrectly parsed as254/10.Enhancements
°Fwith°Cin equations11 DIGFluidssectionmake update, do not keep the temporary.pngtacin the build documentationDebugOnErrorby default, since it confused new usersThis makes the test suite more readable, e.g. we have
ID_expinthe test instead of
D(theDkey being whereexpwas on theoriginal layout), and it makes the test suite layout-independent,
paving the way for reuse on other hardware (e.g. HP50G).
This discussion was created from the release Release 0.8.4 "Commands" - Optimizations and equation fixups.
Beta Was this translation helpful? Give feedback.
All reactions