Releases: c3d/db48x
Release 0.9.5.1 "Wait" - Emergency fix for Wait and Refresh
Bug-fix only release for timing of Wait command
Bug fix
The changes that improve battery life in 0.9.5 had an impact on commands that need absolute time, because the internal timer of the DM32/DM42 switches of when in deep sleep. As a result, Wait with durations longer than 1 second would wait much longer than expected, and long-duration Refresh settings e.g. BatteryRefresh would also wait longer than expected. Replace the use of the internal timer with a synthetic timer based on the real-time clock.
Release 0.9.5 "Everlasting" - Power management, offline graphics
This release brings two major new features: vastly reduced power drain, and off-line persistent graphics.
New features
- Off-line graphics are the ability to draw images in memory instead of directly on screen. Like on HP calculators, this works by storing a graphic object in
PICT. Unlike HP calculators,PICTis an actual variable in the current directory, meaning that you can have multiplePICT, although bitmaps use a lot of memory. For example, running500 300 BLANK 'PICT' STOwill create a 500x300 pixels off-line image inPICT, and all graphic commands after that will draw in that off-line image instead of on screen. Off-line graphics are not immediately shown on screen, but are displayed before returning to the command line in a way similar to theShowcommand (i.e. centererd if smaller than the screen, and with scrolling if larger). They are also persistent, meaning that you need to explicitlyClLCDto erase them. - Add
Blank,BlankGrob,BlankBitmapandBlankPixmapcommands to create a blank image with default format, in HP GROB format, in DB48x bitmap (Black and white) format and in DB50x pixmap format (color RPL only). - Add
→HPGrob,→Bitmap,→Pixmapcommands which can be used to generate an HP-compatible GROB format, a bitmap or a pixmap (color RPL only) from an object. If the object is already a graphic, perform conversion. Note that on color RPL, conversions between color and monochrome formats are supported. Colors are converted to monochrome using grayscale patterns. - Add
→LCDandLCD→commands to send an object to the current graphics, or to create a graphic object from the current screen content. - The
Offcommand can now be used in a program and will preserve what is on screen. You can resume execution of the program by using theONkey. AddPowerOffWithImagecommand to show off-images even from programs.
Bug fixes
- Fix display of object
Infoin the interactive stack - Clear system timers before entering system menu, so that the self test menu entry does not run a fast-paced loop.
- Fix off-by-one error in result of
LastBitSet(number bits starting at 0) - Correctly render color pixmaps when on the stack (color RPL only)
Improvements
- Reduce power usage dramatically by disabling timers when going to sleep. This manifests as a higher battery voltage being shown, which is closer to what the DM42 firmware or integrated self-test would show. This will most likely improve battery life for interactive uses of DB48x.
- Reorganize the
MemoryMenuto make both GC and runtime statistics available - Reorganize the
GraphicsMenuby topics to accomodate the new commands - Add image checks in the test infrastructure for RPL code examples
- Add tests for RGB colors
- Repair
make comparewhich was trying to build a binary fromcompare.cc - Make
Suba compatibility spelling forExtract, not the default one - Adjust low battery indications to avoid premature warnings
- Make
debug_printfuse lower-level routines that can run earlier after boot - Add
make INSTALL_PGM_ONLY=y installoption for faster install - Generate DB48x bitmaps by default instead of HP-compatible GROBs. Bitmaps use less memory when the width is not a multiple of 8.
- Make test of pixel functions more reliable by increasing their timeout
- Add help for
ModesMenu,SymbolicResultsandNumericalResults
Release 0.9.4 "Face, meet palms" - Pixmaps, bug fixes
This release fixes embarassing numerical bugs introduced in 0.9.3 and introduces a new pixmap type intended to capture screen pixel maps including in color. Builds for hardware calculators are also smaller due to switching to a nano configuration for the compiler.
New features
- graphics: Add
pixmaptype
Bug fixes
- Adjust unit conversion in
StdRnd - Fix parsing of
ΣY²in equations - Render non-fancy large exponents correctly (e.g.
1E123456789012345) - The precision of numerical constants now adjusts after changing
PREC - Avoid unnecessary purging of constants cache due to internal precision changes
- Return tests values to rounded valus as validated with Wolfram Alpha
- directory: Fix
STOVXandStoreto non-current directories
Improvements
- Fix
sqrtprecision, notably for perfect squares (ouch) - Improve support for recent ARM compilers
- Eliminate new
clangwarnings - Eliminate warnings about function pointers in latest XCode
- Add documentation for
DisplayModesMenu - Precision adjustments are now more consistent across decimal functions
Release 0.9.3 "Transfigured" - Documentation, bug fixes
This release keeps improving the documentation based on the original HP50G Advanced Reference Manual, and fixing issues that are found along the way. It also improves statistics support and adds low-level array manipulation.
New features
- Add
PredX,PredYandΣLinecommands for linear regression predictions.- The
PredXcommand predicts the independent value from the dependent one. - The
PredYcommand predicts the dependent value from the independent one. - The
ΣLinecommand returns the regression formula.
- The
- Add
Mediancommand to compute the median of statistics series - Add low-level array manipulation commands,
COL+,COL-,ROW+,ROW-,CSWPandRSWP, to add, remove and swap rows or columns.
Bug fixes
- Strip trailing zeros from decimals converted from integers, in order to avoid producing incorrectly normalized values. For example,
70000converted to decimal now produces a 5-bytes decimal value and no longer a 6-bytes decimal value. This fixes the result of theSigDigcommand on this input value, as well as fixes cases where comparisions would be incorrect. - Accept quoted names in
==andsame. HP calculators evaluateAandBin'A' 'B' ==but not in'A' 'B' same. - Add symbolic support for logical operations, i.e. correctly create an expression for
'X' 3 andinstead of a type error. - Compute linear regression for each mode when running
BestFit. The previous implementation would erroneously compute the correlation with various modes (linear, log, exp and power), but without optimally recomputing the parameters with that mode. - Consume arguments in
XCol,YColandColΣ - Write slope and intercept in the correct order when updating
ΣPar. The order was wrong, causing various commands to either update them in the wrong order, or to swap them. - Do not emit an error if the stack is empty when running
Σ- - Fix and optimize parsing of
== - Fix a bug in decimal comparisions used by
sqrtandcbrt, fixes the computation of the last digits ofsqrt(163)at 24-digit precision. - Compute
logwith 3 additional digits to avoid getting the last digit wrong in'ln(640320^3+744)/sqrt(163)' - Compute
exp,exp10,logandlog10with additional internal digits to make sure that the last digit is good (verifiied usingcalc). - Fix sign error in buoyancy equation for Champagne bubbles
- Fix
pparparsing and premature validty checking, which caused20 30 XRNGto fail because of a transient state wherexmin<xmaxwas not verified. - expression: Fix rare GC bug in
expression::simplify
Improvements
- Compute all decimal functions with increased precision. The tests now check that the last digit of the functions result for the tested input is correctly rounded.
- Add
typevalue forxlibobjects in HP compatibility mode - Add
TruthLogicForIntegersflag for compatibility with HP calculators when evaluating something like42 and 4. DB48x by default computes this bitwise, which returns0, a logicallyFalsevalue. With the new compatibility flag, the arguments are interpreted as truth values, and the computation producesTruefor improved compatibility with HP calculators. - Add RPL programming examples in the documentation, lifted from the HP50G Advanced Reference Manual, covering conditional statements such as
IF,IFT,IFTE, documentation about tests and conditional structures, type tests, logical commands such asand,or,not. - Add documentation and menu entry for
Headercommand - Add documentation about local variables and the scope of local variables
- Add tests for statistics operations
- Optimize retention of slope and intercept in
BestFit - Micro-optimization on stack operation for comparisons
- Add
MSolvralias forSolverMenufor compatibility with HP calculators - Allow nested precision adjustments in
decimal::precision_adjustclass - Tests now display failures in a way that makes it easier to compare.
- Add documentation for
SeparatorModesMenuentries - runtime: Add check that we push only valid objects
- runtime: Cleanup, remove leftovers from earlier debug
- runtime: Add check for pointer validity
- runtime: Add utility to dump GC pointers
- arithmeric: Add recorder entry to record what operations happen
- Update copyright year to 2025 in
VERSIONcommand
Release 0.9.2 "Temptations" - Multi-variate solver, documentation
This release introduces a true multiple-variables solver, additional matrix operations, and extends the RPL programming documentation.
New features
- The
Rootcommand now selects a true multi-variable solver (Jacobian solver), capable of solving systems of equations with multiple variables, even when variables cannot be isolated one at a time, for example solving{ 'sin(x)=y' 'sin(y)=x+1' }. As a result, the DB48xRootcommand now covers the functionality provided by the HP50G'sROOT,MROOTandMSLV. - Compatibility for
MSLVis preserved thanks to a dedicated command, which like the HP50G leaves input equations and variables on the
stack. - Add
RNRMandCNRM(row and column norms) commands for matrices. - Add
TRNandTRANcommands (matrix transpose, with or without conjugate)
Bug fixes
- Add several missing images used by the test suite to the
gitrepository, e.g. for theTVMmenu. - Fix rare bug parsing lists causing a validation error
- Fix theoretical risk of memory corruption in
det - Solutions found by the solver no longer depend on the existence and value of global variables by the same name prior to solving
- Emit "Interrupted" error when interrupting the solver
- Fix bug comparing decimal zero with small decimal values
Improvements
- Add a section with RPL programming examples, seeded with examples from Chapter 1 of the HP50G Advanced Reference Manual.
- Add documentation about program objects, text, symbols and comments.
- Update documentation for complex numbers, e.g.
ℝ→ℂcommand. - Add documentation for
abs - Add links to "Rules" in constant uncertainty section
- Add a few additional tests in the documentation
- Split instrumentation for the three solver algorithms.
- The solver now uses the display precision to limit the precision of the desired result, like the integrator and like HP calculators.
Video demo: https://www.youtube.com/watch?v=hj-LGN2nhzU
Release 0.9.1 "Follow" - Finances, bit-counting and constants
This release follows-up on 0.9.0 by improving the way constants are evaluated to better serve the equation library. It also adds finance-related functions, and specialized bit-counting functions.
New features
-
Add standard and relative uncertainty for all constants. For a constant like
G, which when edited looks likeⒸG, the standard uncertainty isⓈGand the relative uncertainty isⓇG. This shows asUsGandUrGon screen, to match common practice. -
The constants menu now contains helpers to enter constants, and for the commands
Const,StdUncandRelUnc, which generate a constant, a standard uncertainty or a relative uncertainty from a name. -
Implement precision-control functions that make it possible to adjust the result of computatoins adjusting to relative or standard uncertainty.
→Usand→Urconvert betwen standard and relative uncertainty.StandardRound,RelativeRoundandPrecisionRoundround a value based on its standard or relative uncertainty, or according to the precision of some other value. -
Add bit-counting operations.
FirstBitSetandLastBitSetfind the position of the first and last bit set in an integer value.CountBitscounts the number of bits set in an integer value. -
Add finance operations. The finance menu
TVMnow shows a solver for time value of money, with payments at beginning (TVMBeg) or at end (TVMEnd). TheAmortcommand generates the amortization (principal, interest and balance). TheAmortTable, a DB48x extension, generates a complete amortization table. A new setting,FinanceRounding, a DB48x extension, sets the rounding of finance results. -
Add the
Subcommand to extract a subset of texts, lists or grobs. As an illustration, theAnagramprogram was added to the demo state. As a side effect, the named variants for arithmetic operators have been renamed fromsub,mulanddivtosubtract,multiplyanddivide.
Bug fixes
-
Avoid possible crash when using the delete key while searching.
-
Fix a few broken (obsolete) links in the help file.
-
UValnow works on numbers, not just on unit objects, like on HP calculators. -
Remove NewRPL names for some commands like
ToRectangular, and replace them with the DB48x spelling.
Improvements
-
Constants are brought up to date to the latest best practice from the scientific community. This includes computing many derived constants from a smaller subset of exact constants, as well as providing standard and relative uncertainty for each constant.
-
Constant values are cached to accelerate their evaluation. This avoids having to parse and evalute constant definitions.
-
The
ConstantMenuswas reorganized with more constant categories covering dates, mathematics, chemistry, phsyics, particle masses, electromagnetism, atomic sizes, Compton scattering, magnetism, materials and computing. -
The
MathMenuwas reorganized, notably to make the exp and log functions easier to access. This merges the formerPowerMenuandExpLogMenuso that theMathMenustill has less than 18 entries. -
Numerical integration now uses the refinements documented in Kahan's 1980 HP Journal article about numerical integration on the HP34. This makes it possible for example to integrate
'sin(x)/x'over 0 to π interval. -
Numerical integration now limits its precision to the number of digits being displayed, like on HP calculators.
-
Document the difference and rationale for parsing quoted names compared to HP calculators.
Release 0.9.0 "Wilson's Dream" - Full equation library
This version integrates an extended version of the HP50G equation library that Jean Wilson has been working on for many weeks. Equations are also fully documented, with examples illustrating how to use them, and a full documentation of the variables they contain.
It also fully enables the algebraic-assisted solver, i.e. a version of the solver that attempts to isolate variables to evaluate expressions directly, which is both faster and more accurate when possible.
WARNING Equations in the current state of the library are not fully validated yet. DB48x users are invited to test them and report issues they find.
WARNING Constants used in the library are relatively accurate and have been modernized compared to the HP50G version. However, an effort is underway to compute the physical constants that are not fundamental but derived from other constants. It is expected that the numerical values returned from the equations will changeslightly as constants are udpated.
Features
- Improved equation library and documentation The equation library now features more than 650 equations, more than 700 variables, 18 sections and 158 subsections. This is roughtly twice as big as the HP50G equation library, and covers more modern aspects of science such as nuclear physics.
Bug fixes
- solver: Do not propagate errors during
isolateWhen using the algebraic-assisted solver, errors raised by the internal calls toisolateno longer manifest as solver errors. - units: Do not leave error behind in
unit::convert_to_realThis could cause spuriousInconsistent unitserrors while solving. - logical: Make logical operations behave symmetrically, i.e. ensure that
#100+1and1+#100both return#101. - nfunctions: Evaluate symbolic arguments symbolically and fix bugs converting arguments to decimal. The evaluation of
'∫(0;1;x+1;x)'afterx=3would result in a nonsensical expression'∫(0;1;4;3)'. - integrate: Report errors in bound evaluation. An error in the evaluation of the first bound could be "erased" if the evaluation of the second bound was successful. For example, in
'∫(0;1;sin(x)/x;x)', theDivide by zeroerror evaluating'sin(x)/x'atx=0is erased by the successful evaluation atx=1that follows.
Improvements
- equations: Accept units in
isolateThis allows many equations in the equation library to successfully use the symbolic approach, improving accuracy significantly. - add/sub: Accept zero as an operand around units. An operation like
1_km+0is now accepted, and evaluates as1_km.
Signed-off-by: Christophe de Dinechin [email protected]
Release 0.8.11 "Accomplishment" - Towards full equation library
This release contains a number of fixes and features intended for use in the equation library being contributed by Jean Wilson
Features
- Accept library items for functionc calls. For example, the expression
'ⓁSiDensity(273_K)'is now accepted. This function is usd in semi-conductor equations in the library. - The
Rootcommand now attempts symbolic solving using theIsolcommand. This can lead to exact solutions for common equations. - The
SigDigcommand is a DB48x extension that returns the number of significant digits in a number, i.e. the number of non-zero digits. - The
xponandmantnow apply to unit objects - Functions now accept assignments as input, e.g.
x=9sqrtgives3.0 - The equation referenced to by the
Equationvariable can now be identified using a name. - The
NxEqcommand now works with quoted equations
Bug fixes
- The
ln(1E-100)expression no longer gives aArgument outside domainerror. The error was caused by rounding during argument reduction. - Comparison between a value and a unit object now work correclty
- Arithmetic now correctly deals with dimensionless unit objects, for example in expression
'1-1000_mm/m', and improves the evaluation of unit expressions when adding or subtracting unit objects. - Names containing programs or functions are now evaluated as part of algebraic evaluation
- The solver now correctly processes equations wrapped in an expression.
Convertnow correclty evaluates its arguments when necessary- Assignment objects no longer cause a crash on error. For example,
x='ln(0)'no longer crashes.
Improvements
- Improve solver heuristic when slope is small. This allows the solver to find a solution for an equation like
'tan(x)=224'in degrees mode. - Add more recorder entries in the solver describing what is being solved.
- Move recorder entries for tests to
testsdata logger. - Tests use a larger text rendering limit
- Tests now purge the directory between examples. This prevents stray variables from influencing later tests.
- The handling of long UTF-8 sequences in tests was improved, which allows tests involving a lot of text (e.g. examples) to run faster.
Release 0.8.10 "Fire Dove" - Input and Prompt, Android preparation
The focus of this release is support for user input in programs, with the addition of the Input and Prompt commands. Internally, a lot of groundwork was performed towards Android builds.
New features
-
Add
Promptcommand, which programs can use to let users manipulate the stack or do other operations before resuming execution. -
In order to facilitate the use of
Prompt, added theRuncommand, which resumes execution of halted programs and otherwise evaluates the first item on the stack. The key at the left of the + key, which is labeled R/S on the DM-42 calculators, is now bound to theRuncommand instead ofEvaluate. Therefore, after aPrompt, you can resume execution with a single key. -
Add
Inputcommand, which programs can use to let users enter data. The DB48x version makes it easier to enter and validate numerical data or other non-text objects, with input validators for numbers, integer values, arithmetic objects or expressions. It is also possible to use custom code to validate user input. -
Additional
Compilevariants were created to help with this user input validation, checking if the input is a number, an integer, a positive integer, a real number, a single object, a single algebraic object or an expression.
Bug fixes
-
Fixed problem with the computation of the length of the integer value being parsed if it was parsed from a text value at the end of the temporaries.
-
Emit an error from
Stepand variants if no program is being debugged. The effect was that the next program being run would halt after the first step. -
Avoid persisting beep in the simulator when two beeps were emitted rapidly in successioon.
-
Reload the user-selected keymap file after loading the state file.
Improvements
-
Change capitalization of
DTagas a shortcut forDeleteTag. -
Various code improvements making it easier to compile for Android. A side effect is that the simulator can now safely be started from any current directory.
-
Improve rescaling of the window in the simulator to keep the keyboard and screen larger and easier to read.
-
Improve the detection of the default simulator size for Hi-DPI screens.
-
Add documentation about matrix multiplication performance
-
Make the default memory size more consistent with the simulated device.
Release 0.8.9 "Advent" - Mostly bug fixes
This is a relatively minor release, with mostly bug fixes, but also a new, explicit syntax for hardware-accelerated floating-point.
New features
- Hardware-accelerated IEEE-754 binary floating-point values are now identified with a suffix,
Dfordouble(64-bit),Fforfloat(32-bit). For example,1.23is a variable-precision decimal value,1.23Dis a 64-bit binary floating-point value, and1.23Fis a 32-bit binary floating-point value. This ensures that theHardwareFloatingPointsetting does not change the way a program is compiled or presented, only its computations. - plot: Draw a bar on the horizontal axis for errors. This makes it easier to identify where the function is not defined.
- probabilities: Extend
COMBandPERMto real arguments. For real argument, the Gamma function extension of the factorial is
used with the usual expressions to compute combinations and permutations. One user remarked that some half-integer combinations of arguments, for example, directly give some common Taylor series factors with a single expression. - decimal: Add decimal to integer conversion (
R→I) - simulator: Add
-Noption to disable sound. This is notably useful on Linux where some hardware platforms takes tens of seconds to fail, slowing down error messages. - simulator: Recognize settings on the command line. For example, you can enable the silent beep feature (flashing screen on error) by passing the
SilentBeepOn=trueparameter on the command-line. - parser: Add
PRECalias forPrecision.
Bug fixes
- random: Fix bias in integer version of
Random. Using1 10 Randomwould generate values1and2at half the frequency of other
values. - help: Do not process links that are not visible. This could cause links that had scrolled past the top of the screen to be incorrectly selected when pressing the ENTER key, even if there was an RPL code example visible on the screen.
- simplifications: Do not simplify infinities. Earlier versions would incorrectly apply a rule like
X-X=0to the case whereXwas an infinity, giving incorrect results. This could manifest for example inCombwith decimal input returning1for large values (as a result of dividing∞by∞) andDetreturning0(as a result of subtracting∞from∞). - expression: Fix rendering of
derivative,primitiveandwherein HP compatibility mode. This could cause programs to become unparseable, e.g. with∂X(X+1)turning intoDERIVATIVEX(X+1). - expression: Do not render arity-2 commands as infix. For example,
CONVERT(X;1_m/s)no longer renders asX CONVERT 1_m/s. - simulator: Improve extension checks on case-independent filesystems. On such systems, files
foo.48sandFOO.48Sare identical. The simulator could incorrectly add a second extension if the case did not match. - arcsin: Fix the incorrect computation of
arcsin(1). More generally, improve the way exact angles are generated by functions that require them. This allows such functions to now return non-rounded results when using angle modes such asdegrees. Previously, a computation involving the value of theπconstant would cause some rounding even if an exact result was possible. - Fix a rare bug in the user interface which could lead to memory corruption if a garbage collection happened at the wrong time.
- Accelerated arithmetic evaluation is now correctly disabled when the
HardwareFloatingPointsetting changes. - Fix silent errors when
NumericalResultsis on and computations involve non-normal results (e.g. infinities). - Convert infinities correctly from hardware floating-point to decimal.
Improvements
- simulator: Return relative paths when selecting files when possible. For example, when selecting the name of a keyboard layout, a file is written on disk that used to contain the absolute path of the layout file being used. As a result, moving the simulator directory elsewhere would make the file unreadable.
- files: Automate tracking of open files. A mechanism was implemented in earlier releases to avoid opening two files at the same time, because that is a limitation of the DMCP implementation on SwissMicros calculators. That mechanism required manual maintenance by developers, and was the source of many bugs. A new mechanism replaces it that transparently manages scenarios where multiple files are open simultaneously. This should quash annoying bugs, such as one where the simulator would write state files with incorrect spelling for constants or library items.
- doc: Remove the
docol.mdsection of the help. This file was inherited from newRPL documentation, and incorrectly documented existing DB48x functions, or mentioned functions that do not exist on DB48x. - grob: Accept BMP files with zero colours. Some contributors have submitted files generated by Windows tools that describe the BMP file as a bitmap with 0 colours instead of 2. These files were not loading in the helpfile. They are now read and displayed correctly.
- Hardware-accelerated floating-point arithmetic now also benefits from the accelerated dynamic dispatch.