Skip to content

Releases: c3d/db48x

Release 0.8.9 "Advent" - Mostly bug fixes

29 Dec 23:12
@c3d c3d
Compare
Choose a tag to compare

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, D for double (64-bit), F for float (32-bit). For example, 1.23 is a variable-precision decimal value, 1.23D is a 64-bit binary floating-point value, and 1.23F is a 32-bit binary floating-point value. This ensures that the HardwareFloatingPoint setting 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 COMB and PERM to 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 -N option 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=true parameter on the command-line.
  • parser: Add PREC alias for Precision.

Bug fixes

  • random: Fix bias in integer version of Random. Using 1 10 Random would generate values 1 and 2 at 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=0 to the case where X was an infinity, giving incorrect results. This could manifest for example in Comb with decimal input returning 1 for large values (as a result of dividing by ) and Det returning 0 (as a result of subtracting from ).
  • expression: Fix rendering of derivative, primitive and where in HP compatibility mode. This could cause programs to become unparseable, e.g. with ∂X(X+1) turning into DERIVATIVEX(X+1).
  • expression: Do not render arity-2 commands as infix. For example, CONVERT(X;1_m/s) no longer renders as X CONVERT 1_m/s.
  • simulator: Improve extension checks on case-independent filesystems. On such systems, files foo.48s and FOO.48S are 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 as degrees. 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 HardwareFloatingPoint setting changes.
  • Fix silent errors when NumericalResults is 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.md section 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.

Release 0.8.8 "Voice" - Power usage reduction

08 Dec 23:31
@c3d c3d
Compare
Choose a tag to compare

This release focuses on reducing power usage and improving reactivity, notably while running on battery.

Features

  • Cache rendered graphics and text on the stack to reduce the time spent redrawing the stack.

  • Limit the size of objects being rendered on the stack. Objects that are too large will simply render as something like Large bignum (399 bytes) on the stack. This is configured by two new settings, TextRenderingSizeLimit and GraphRenderingSizeLimit.

  • Limit the size spent rendering graphical objects. There are four settings controlling the maximum time spent rendering objects graphically. ResultGraphingSizeLimits controls the display for the first level on the stack, StackGraphingSizeLimit controls the display for the other levels on the stack, ShowTimeLimit controls the display for the Show command, and GraphingTimeLimit controls other graphical rendering.

  • Blink the battery icon when in a low-battery situation.

  • Add configurable MinimumBatteryVoltage to adjust the threshold for low-battery detection and automatic power-off.

  • Power-related commands: The BatteryVoltage and PowerVoltage read the battery and power voltage respectively. The USBPowered commands detects if the calculator is running on USB power. The LowBattery command detects if the calculator is running low on battery.

  • Detect and reject Unicode characters that look like mathematical characters, and are produced by auto-correction on Windows, notably the- and * signs that look like - and *. This is notably useful when copy-pasting in the simulator on Windows.

Bug fixes

  • Fix NDupN again. While the previous release fixed what NDupN does, it did not fix the detection of the number of arguments, meaning that NDupN would incorrectly complain about missing arguments if the stack was not deep enough.

  • Fix the precedence of unary - when in front of a parenthesized expression. For example, -(X)^2 now parses correctly.

  • Disable keyboard repeat timer when no key is pressed. It was possible to trigger a condition where the keyboard repeat timer would trigger continuously if two keys had been pressed in rapid succession, keeping the CPU in a busy loop and depleting the battery unnecessarily rapidly until another key was pressed. This could also trigger incorrect long-press detections, e.g. the shift key triggering alpha mode instead of a simple shift.

  • Disable all timers when switching the calculator off. In some situations, the display refresh timer could still remain active
    after the calculator had been switched off.

  • RclΣ now returns the statistics data even when the ΣData variable contains the name of a variable or file.

  • The Off command can now be used while editing and no longer causes immediate command-line evaluation.

  • Return to the first page of the catalog menus when updating it, to avoid scenarios where the catalog appeared empty

  • Return to the first page of the cartalog menu when changing directories, to avoid showing an empty variables menu in a non-empty directory.

  • Do not leave garbage on the stack after failed array arithmetic.

  • Avoid occasional test crashes due to concurrent pixmap updates in the simulator.

  • Avoid occasional spurious error on Primitive test due to long execution time.

  • Switch to kg as the base unit for UBASE instead of g, following the SI standard.

Improvements

  • Reduce animations more drastically while on battery power. Notably, the cursor does not blink, and menu animations are entirely disabled.

  • Rework the animation and screen refresh system to make it easier to maintain and more power-efficient while on battery.

  • Refresh the display using hardware-accelerated background refresh routines provided by the DMCP platform. This can be disabled using the SoftwareDisplayRefresh flag.

  • Redraw the battery immediately on power change, i.e. plugging or unplugging the USB cable.

  • Updated built-in constants with latets CODATA values(contributed by Jean Wilson)

v0.8.7 "Signs" - Performance optimizations

02 Dec 01:39
@c3d c3d
Compare
Choose a tag to compare

This release focuses on performance improvements and bug fixes for issues reported by users and contributors.

Features

  • Long array operations such as matrix multiplications can now be interrupted with the EXIT key.

  • Eliminate local names from LNAME output. For example, if you perform a sum with a variable named i as an index, no longer report i as being a name used by the expression..

  • Implement HEAD and TAIL for text objects.

  • Allow constant definitions to contain expressions, which will be fully evaluated when using the →Num. This makes it possible now define constants using other constants, in the spirit of the more recent CODATA recommandations.

  • Library management commands Attach, Detach and Libs are now implemented. These commands make it possible to reload a library entry after changing its definition on disk. While they take arguments that are similar to what HP calculators do, they are not interpreting them in the same way due to hardware differences between SwissMicros and HP calculators.

Bug fixes

  • Fix hard crash when running some RPL programs using conditional loops, local variables and/or deep recursion. The crash was caused by a non-robust check of whether the call stack needed to grow or shrink, which was replaced with a much more robust check.

  • Fixed the precedence of the unary - operator, so that -X^2 now parses correctly (it used to be interpretd as (-X)^2)

  • Fix a crash where an error during an array operation could cause a null pointer to be pushed on the stack.

  • The test suite now correctly reports error detected while checking the examples in the online help.

  • The multi-solver no longer considers the index variable in a sum or product as a variable to solve for. This avoids spurious errors claiming that a solution cannot be found. The same also applies other functions that take a variable name as an argument, such as Root, Integrate or Isolate.

  • Fix a crash when comparing unit objects that cannot be converted from one to the other, e.g. comparing 1_m and 1_h.

  • Fix the order of commands in the build instructions for Windows.

  • Fix the NDupN command to duplicate an object N times. In earlier releases, it was incorrectly duplicating N objects and leaving N on the stack.

  • Accept addition and subtraction between a number and a unit object where the unit can be reduced to a number, so that '1+1_km/m' is now a valid expression. A few additional entries in the equation library now work thanks to that fix.

  • Avoid a rare crash where the error command would be corrupted when cleaning temporaries.

Improvements

  • Performance optimizations for decimal arithmetic, using 25x25 matrix multiplication as a test scenario to optimize. The performance of such multiplication was improved by about one order of magnitude, and is now comparable to DM42 performance. This was achieved in particular by making more aggressive cleanup of temporaries, by reducing the need for garbage collection, by adding a fast-tracked path for arithmetic operations when the types are the same as for the last operation, and by deferring the construction of arrays until the value of all elements are computed.

  • Add a few new sanity checks for the runtime when running on the simulator, notably to detect cases where the internal pointers are not in the expected order, and to more precisely report issues if integrity checks fail during garbage collection

  • Add locking to the garbage collected pointers list when running on the simulator, in order to improve test stability. Testing on the simulator is the one case where multiple threads may concurently access the pointers list.

  • Accelerate the tests that insert large amounts of text from source code, notably the equation parsing tests and the help examples checks. In addition, use a smarter method to insert RPL separators such as [] or '', taking advantage of the fact that they are usually entered in pairs. These two improvements reduce the total runtime of the entire test suite by a factor of more than 4.

  • While testing the online help examples, only report the exact section title and not all the section titles that contain the same
    text.

  • Systematically strip tags and assignment objects for all arithmetic operations.

  • Add a version of the debug_printf that automatically selects where to draw on the screen, and automatically clear what follows the printed text using a gray pattern.

  • Render the DB48x TrueType font to bitmap using a more recent version of the FreeType library. This causes minor glyph differences compared to earlier releases. The test suite was adjusted accordingly.

  • Remove some of the leftover references to newRPL commands that will not be implemented or make no sense for DB48x. This work is not finished yet. The mechanism to remember which command caused a particular error was also made somewhat more efficient.

  • Consolidate the two distinct documentations of the Root command.

Release 0.8.6 "Daniel" - Bug fixes and optimizations

17 Nov 23:20
@c3d c3d
Compare
Choose a tag to compare

This release is mostly intended to fix a number of issues reported by users or discovered during testing.

Features

  • Fancy digits are now accepted for decimal and based numbers. This means that 1.E³² is now a valid input to Str→, ensuring that we can parse the output of →Str if it uses fancy characters, or that copy-paste works from the stack to the editor.
  • Accept array arguments for min and max, applied element-wise in the same way as addition for example.
  • Add CompatibleBasedNumbers setting to render 16#AB as #ABh like HP calculators.
  • Improve protection against mismatched QSPI and PGM. Only binaries issued from the same build are now accepted. This is mostly of interest to developers, although releases that are very close to one another, like v0.8.4 and v0.8.5 were, can require this protection.
  • On DM32, numbers with an explicit numerical base keep that base if it's 16, 10, 8 or 2. For example, 10#200 and #200₁₀ will display in base 10 irrespective of the Base setting, just like #200d.
  • Add ϵ character (Greek Lunate epsilon), which appears in some equations.
  • Add text alignment options to DrawText, making it possible to align text horizontally or vertically. See examples at end of the Texts program in Demo.48s
  • Add UnitsSIPrefixCycle command to set the variable with the same name to customize SI prefixes cycling for units on the command-line.
    After "KMG" UnitsSIPrefixCycle, typing the Cycle key (_×10ⁿ or EEX) with 1_B will cycle through 1_KB, 1_MB, 1_GB and back to 1_B.
  • Accept u as an alternative SI prefix for "micro-", e.g. 1_us. This is intended to allow entering of the "micro" prefix using transient alpha mode.
  • Add help lookup for solver variables. When in the SolverMenu, holding the function key for a vairable brings up the help for the corresponding variable in the equations library.
  • Add SiDensity (SIDENS on HP) and Fanning functions to the library. These functions are used by some equations in the library.
  • Add invert alias for 1/x operation (like negate for neg).

Bug fixes

  • Fix unit scale cycling for multi-character units
  • Fix incorrect computation of output matrix size for non-square matrices. [[1 2]][[3 4]] + now works.
  • Negation on based numbers and polynomials now works.
  • Conversion of decimal values smaller than 1.0 to integer no longer crashes (this could only happen with the RanM command)
  • Render - for first term of polynonials if negative
  • On DM42, update the bases menu when cycling based numbers
  • Fix parameter mixup for call to program::run. In theory, this could lead to programs not evaluating correctly if NoLastArguments setting was set, although another bug apparently made this very unlikely to be observed.
  • Update index footer to point to https://48calc.org instead of obsolete https://github.io location.
  • Updating a for loop variable from within the loop now behaves like on HP calculators, and can be used to control loop exit.
  • Do not draw activity indicator in graphical mode. This was a regression introduced with BusyIndicatorRefresh.
  • Mark xroot command as implemented in the PowersMenu
  • Use consistent case for variable x in the equations library
  • Do not error out comparing text values
  • doc: Fix typo latter -> letter

Improvements

  • Add auto-cleaner optimizations for matrix and vector operations. This reduces the memory usage and frequency of garbage collections.
  • Reduce random bias for integer input, e.g. -10 10 random no longer has a +0.5 bias on average.
  • doc: Several updates and fixes to the documentation, notably with respect to the description of the current status, and instructions for Windows developers.
  • Add →Prg alias for →Program
  • Add the simulator minimum window size
  • Add rmdir as an alias for pgdir. "This is Unix".
  • Add L (uppercase) spelling for "liter" unit
  • doc: Avoid overlapping aliases in Rcl/ help text by adding some
    aditional text to the Rcl* help.
  • doc: Add documentation for SolverMenuSolve and SolverMenuRecall
  • doc: Fix documentation for AssignKey
  • doc: Add documentation for comparisons
  • doc: Remove duplicate dup
  • doc: Update documentation about add
  • doc: Refer to CharactersMenu and Catalog in alpha overview
  • doc: Update keyboard sequences typography
  • doc: Remove false claim that interactive stack is not implemented
  • doc: Update implemented / unimplemented list

Signed-off-by: Christophe de Dinechin [email protected]

Release 0.8.5 "Stone" - Emergency keyboard fixups

12 Nov 01:03
@c3d c3d
Compare
Choose a tag to compare

The major changes in 0.8.4 caused some damage to keyboard handling code that require a few emergency fixes.

Bug fixes

  • Fix incorrect selection of lowercase characters
  • Fix the location of exp and log10 in 42style and true42 keymaps.
  • Do not enter interactive stack if reaching leftmost position of the text editor.

Full Changelog: v0.8.4...v0.8.5

Release 0.8.4 "Commands" - Optimizations and equation fixups

11 Nov 09:36
@c3d c3d
Compare
Choose a tag to compare

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].48k file 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.48k is a key layout that is more logical and effective for DB48x, See thread.
    • legacy.48k is the layout used for earlier releases, which swaps the exp and log10 keys relative to the DM42 in 42style.48k.
    • 42style.48k keeps key layout as close as possible to the DM42
    • true42.48k is identical to 42style.48k, but the simulator shows an image of the DM42 keyboard.
  • Add various commands such as Edit to directly perform editing operations in a programmatic way.

  • units: Implement non-proportional unit conversions, notably temperature conversions like °F to °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 K in multiplication and division. For example, when computing ⒸR*T, we need the temperature T to be in K even 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 of No 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 exp is 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 GCStats command to show garbage collector statistics.

  • Allow CustomMenu to contain the name of a menu, or a program that builds the menu dynamically. An example is shown in the RPL directory of the Demo file.

  • Allow CustomMenu to 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 of x and not as a x! 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 DebugOnError is set while evaluating an iferr statement. The assumption is that if you try to catch an
    error, you do not intend to debug the code being tested for an error. If this is not the desired behaviour, then an explicit DebugOnError should be inserted in the body of iferr.

  • 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 atan2 special cases to always generate the correct angle. Cases where atan2 would generate an exact result would usually result in the wrong angle unit scaling being applied.

  • Fixed parsing of tan⁻¹ in expressions.

  • units: Skip the =Cycle section for unit definitions. This was causing incorrect unit conversion errors for users who had added common units in the =Cycle section of their config/units.csv file.

  • The user-defined units menu no longer list all the built-in units after the user-defined ones.

  • Add a missing sqrt in the RelativisticKineticEnergy sample code, and do not compute the kinetic energies for negative values.

  • Alias keys is for KeyMap, not Header. Fix typo in identifiers table.

  • Avoid a crash in RandomMatrix when 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 type message for V→ 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 ubase algebraic expressions, e.g. ubase(1_km), as well as other function-like commands such as size.

  • Accept numerical values in ubase and 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 ΔT in a multiplication, where the value would be incorrectly converted to K.

  • 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 units messages when this caused a unit such as 254/10_mm for in to be incorrectly parsed as 254/10.

Enhancements

  • Major update to the documentation of the equation library, contributed by Jean Wilson.
  • equations: Replace °F with °C in equations
  • tests: Add support for tests that are known to fail
  • tests: Run equation tests with 11 DIG
  • tests: Add ability to take screen snapshots on failure
  • units: Put temperatures before pressure in Fluids section
  • help: Add image for B Field From Finite Wire
  • Makefile: When using make update, do not keep the temporary .png
  • Indicate where to get tac in the build documentation
  • Fix README link to browser version
  • Disable DebugOnError by default, since it confused new users
  • Enhance the test suite so that it looks up the keys to use.
    This makes the test suite more readable, e.g. we have ID_exp in
    the test instead of D (the D key being where exp was on the
    original layout), and it makes the test suite layout-independent,
    paving the way for reuse on other hardware (e.g. HP50G).

Release 0.8.3 "Blindness" - User mode and custom header

28 Oct 07:35
@c3d c3d
Compare
Choose a tag to compare

This release focuses on various user interface aspects.

Features

  • User mode, key assignment, ASN, STOKEYS, RCLKEYS, DELKEYS. Unlike HP calculators, key assignments are per directory, with inner directories inheriting the key assignments from the enclosing directories.
  • Add Header command to customize the header. For example, you can now show the path in the header, or any relevant information. This customization can be done per-directory.
  • Implement Menu, TMenu and RclMenu commands
  • help: Automatically create links for references to RPL words. When we have sin in the Markdown file, the calculator will
    automatically insert a hyperlink to the corresponding entry. Note that this only applies to the calculator, not to the GitHub rendering of the Markdown files.
  • Display object type in the Info box of the interactive stack.
  • Fallback graphic rendering of objects to text when the usual heuristics did not allow the graphics to fit in the alloted pixel space. For example, a fraction that does not fit will now display using the textual form if that particular form can fit in the given box.

Bug fixes

  • Fix a bug that could cause the text editor cursor to move past the end of the editor when inserting text, possibly causing memory corruption.
  • The Show command will now show all digits, and render fractions using multiple lines for the numerator and denominator so as to be
    able to show more digits in a readable way.
  • When terminating a command using auto-completion in the Catalog feature, the command that was entered is now present in the
    command-line history.
  • Arithmetic operations that combine text or lists and unit objects now behave correctly. For example, adding a unit to a list appends
    like any other object.
  • Move updir if evaluating an updir directory, instead of corrupting the directory stack.
  • Clear transient object if entering the interactive stack, e.g. when exploring the interactive stack while in the SolvingMenu and solving an equation, and correctly update the transient object when switching menus.
  • Render vectors as RPL code in the equation examples.
  • Correctly redraw the text editor when using the interactive stack Echo feature with stack items spanning multiple lines
  • Fix minor typos in the equations documentation.

Improvements

  • tests: Only evaluate after parsing RPL examples in the documentation when the stack is not empty
  • The Wait command now returns a key code in the same style as HP calculators, i.e. with row, column and plane. Also, like HP calculators, it processes shift keys and returns a plane, instead of returning the keycode of the shift key.
  • Capitalize Path, CrDir, Home, UpDir so that their rendering in compatibility mode with the Cmd setting looks better.
  • Add DB48X_SPEEDUP environment variable support in the simulator.
  • documentation: Update Authors section

Full Changelog: v0.8.2...v0.8.3

Release 0.8.2 "Honor Seats" - Equation Library Examples, Assignments

21 Oct 05:44
@c3d c3d
Compare
Choose a tag to compare

This release is focusing on the testing, validation and usability of the equation library contributed by Jean Wilson. To that effect, it introduces a new kind of objects, assignments, that only exist on the DB48x and have no direct equivalent on original HP calculators. It also completes the support for library equations in the Root command.

Here is an example that illustrates these capabilities, testing the Ohm’s Law & Power equation in the library:

V=240_V  I=32_A
@ Expecting [ R=7.5 Ω P=7 680. W ]
'ROOT(ⒺOhm’s Law & Power;[R;P];[1_Ω;1_W])'

If you are reading this release note directly on the calculator, you can simply click ENTER while the text above shows up, and it will be copied in your editor. You can change the values of the input variables to explore various possibilities.

In this example, V=24_V is an assignment object that assigns the value 24_V to the global variable named V. It is almost equivalent to 24_V 'V' STO V, except that the value placed on the stack is the assignment object itself. In other words, evaluating V=24_V places V=24_V on the stack. This makes it easy to edit or evaluate assignments on the stack using the interactive stack. In particular, you can select an assignment on the stack wiht the interactive stack and use the Eval (F3) function to restore the variable to the value in the assignment.

The ROOT command in the example illustrates how you can directly use equations in the equation library as argument to Root, and use the multiple-equation solver to solve for more than one variable at a time.

All the examples in the on-line help are now also tested automatically, in order to ensure that all the given examples give the expected results.

Features

  • Implement CustomMenu, whicih is toggled by successive presses on the VAR key. An example is shown in the Demo.48s file. The
    content of the CST or CustomMenu variable is used to define this menu.
  • The documentation now contains numerous executable examples. These examples are identified by a Markdown code block with the rpl syntax colorization indicator. They can be executed directly from the on-line help on the calculator by hitting ENTER while the code block is shown on the screen.
  • The test suite automatically tests all the documentation examples.
  • New equation sets: Light Propagation and Ultrarelativistic Cases
  • Four new equations in Energy & Momentum equation set
  • Assignment objects in the form Name=Value, e.g. A=3.
  • The solver now emits assignment objects for the solution
  • command to store while keeping value on stack. As an extension relative to the HP50G, this command also works inside RPL algebraic
    expressions. For example 3▶A stores 3 in A and returns the value in A. The command is called Copy (the HP50G ARM calls it
    ▶ (Store))
  • The Root command now accepts library equations as input.
  • Arrays and lists are now accepted in algebraic expressions, using ; as a separator between values. For example, '[1;2;3]+[4;5;6]'
    adds two vectors using an algebraic notation. Vectors can contain algebraic expressions. For example '[x+1;y+2;z=3]' is a valid
    vector expression.
  • The solver now accepts algebraic input, including for the multiple equation solver using vectors as input.
  • Ad RombergPlot example to Library and Demo file. This example shows how the Integrate command evaluates the underlying function.
  • menus: Add XRng and YRng to the PlotMenu

Bug fixes

  • Fix a sign bug in the Simple Slope equation
  • Fix "Too many open files" error while saving constants
  • Avoid infinite loop for unterminated case statement
  • What follows a unit in an algebraic expression is no longer ignored.'330_m-20_m' was incorrectly interpreted as '330_m', now
    correctly computes '310_m'.
  • Fix and document the Integrate imprecision and iteration settings.
  • text: Respect display settings in →Str. For example, 3 FIX 0.1 →Str now returns "0.100" and not "0.1", like on HP calculators
  • Repair parsing of HP-style complex numbers, e.g. (12;3)
  • Refactoring of object insertion in text editor to fix various bugs, including the Echo command in the interactive stack inserting the
    object at the end of the text editor instead of at the cursor position.
  • Do not issue Invalid digit for base on the console parsing 1E-10
  • Fix null-dereference issue in to_decimal_if_big, which could be triggered if interrupting an Integrate command using the EXIT key.
  • Avoid occasional garbage at right of menu area
  • simulator: Ensure Copy correctly quotes equations
  • Move image for E Field Finite Line to right section

Improvements

  • Add references to keyboard overlays in the documentation
  • Add documentation for the Root command
  • Improve the way we generate the image files in the Makefile
  • Improve solver behaviour when a solution is not found. Notably, the solver is more likely to converge towards an extremum, and is more likely to find complex roots.

Full Changelog: v0.8.1...v0.8.2

Release 0.8.1 "Sale" - Multi-equation solver

15 Oct 06:57
@c3d c3d
Compare
Choose a tag to compare

Features

  • Multiple-equation solver (HP's MES), solves for variables one at a time
  • The | operator (aka where) applies to library equations
  • The | operator respects variables with units in expressions
  • simulator: Add support for copy and paste (to/from simulator)
  • Add support for cylindrical and spherical 2D and 3D vectors
  • Positional graphic combination operations (e.g. GraphicRatio)
  • Switch to Greek or Cyrillic keyboard maps based on character menu
  • Add EDIT menu commands to transient alpha (e.g. ▶F3 is Word→)
  • Index the help file for performance (about 5x faster on DM42)
  • Accept verbatim code and RPL code snippets in the help file
  • Parse and show help topics taking all aliases into account
  • Convert lists and equations to RPL programs with →Program

Bug fixes

  • Show tagged values for vectors and matrices
  • Update the target global variable after running root
  • Show all variables in the SolvingMenu (with a settings to control it)
  • Unit-related commands accept tagged objects and expression-enclosed units
  • Add angular units (e.g. radians) in angular equations
  • Correct unit for V in Cantilever Shear (was n instead of N)
  • Purge now correctly restores UI patterns settings
  • Add missing font parameter to →Grob (HP calculator compatibility)
  • Include equations and xlibs to list of symbolic objects
  • Fix precision loss for atan, acos and asin for some values
  • Add angles for atan2 when using hardware-accelerated floating-point
  • Remove spaces and separators in the names of library equations
  • keyboard: Replace ASN with ->NUM
  • Preserve trailing decimal separator in FIX mode with NoTrailingDecimal
  • Fix backspace and delete operation around number separators
  • Fix the definition of cosh for complex values (was computing sinh)
  • Accept uppercase and lowercase .48s when saving/restoring state
  • Accept both Ω or Ω as spellings for Ohm (different Unicode)
  • Only update the state file when disk operations are successful

Improvements

  • Add arcsin, arccos and arctan spellings
  • solver: Reorganize solver code
  • documentation: Udpate equation documentation with examples
  • Save UI patterns as hexadecimal numbers (also in Modes command)
  • Use only tabs in library.csv
  • Keep cursor at end of buffer when moving through history with word right
  • Clear selection when BSP is used with a non-empty selection
  • Ensure debug_printf always refreshes the screen
  • Switch to binary search for command parsing (~100x faster)
  • Rename some statistical functions for consistency
  • Fix the list of authors in the online help
  • doc: Update performance data

Full Changelog: v0.8.0...v0.8.1

Release 0.8.0 "Gabriel" - Symbolic operations, equations and library

29 Sep 20:58
@c3d c3d
Compare
Choose a tag to compare

This release adds symbolic integration, differentiation and equation solving, delivers an extensive equation library, and improves the library feature to enable large library objects to be defined in separate files and optimize execution speed for library items. It also improves the rendering of complex equations and fixes a number of crashes or user-interface problems.

Features

  • Symbolic integration, Primitive command, '∫X(sin(X))' syntax
    '∫X(sin(2*X+3)-X)' evaluates as '-cos(2*X+3)/2-x²/2'
  • Symbolic differentiation, Derivative command, ∂X(sin(X)) syntax
    '∂X(sin(2*X+3)-X)' evaluates as '2·cos(2*X+3)-1'
  • Symbolic equation resolution, ISOL (Isolate) command
    'sin(2*X+3)=A' 'X' ISOL gives 'X=(sin⁻¹ A+2*i1*π-3)/2'
  • Apply arithmetic and functions on both sides of equations like A=B
    'A=B' sin 1 + results in 'sin A+1=sin B+1'
  • Add possibility to define library objects in separate files
    The various demos from previous releases are now also in the library
  • commands: Add →Prog command to convert expressions to RPL programs
    'sin(2*X-Y)' →Prog gives « 2 X × Y - sin »
  • Accelerate evaluation of library entries
    Invoking a library object is as fast as if it was on the stack.
    Notice that this is faster than global objects that require lookup.
  • Add Obj→ support for user-defined function calls
    'F(A;B;C)' Obj→ DROP Obj→ gives [F A B C].
    The first call to Obj→ expands the expression, leaving an isolated
    function call on the stack, which the second Obj→ expands.
  • Automatically convert polynomial objects to expressions when needed
  • Many improvements to the equation library contributed by Jean Wilson
  • Document the equation library variables in the help file
  • Add classical/relativistic Kinetic Energy comparison demo
    This was suggested by Jean Wilson as an illustration
  • parser: Parse and convert HP syntax for |
    Typing 'A(X;Y)|(X=1;Y=2)' converts to 'A(X;Y)|X=1|Y=2'

Bug fixes

  • Improve graphical rendering of some complex expressions
  • Render sqrt as and not squareroot in HP compatibility mode
  • Do not draw parentheses around |x| when rendering abs
  • Redefine rpm as turn/min (unit consistency of rotational speed)
  • Avoid crash in for loop if termination condition fails to evaluate
  • Fix rendering and saving of directories
  • Do not leave incorrect stack content when running Obj→ on text
  • Make size consistent in vectors containing tagged objects
  • Accept tagged objects as input in algebraic functions
  • Avoid parsing error for 1,234 when . is the decimal separator
  • Debug output related to expressions is no longer labelled "equations"
  • Fix unit error in Drift Speed & Current Density
  • Cut the size of the build version ID to avoid DMCP buffer overflows
  • Avoid possible corruption when an error occurs in a program
  • Improve error messages for file errors, e.g. when loading a state
  • Move cursor at correct position after numbers when entering units
  • Reject multiple consecutive units, e.g. 1_m_s
  • Fix issue where we insert = incorrectly on the command line
  • Address simulator warning about potential buffer overflow

Improvements

  • tests: Add tests for the newly added library entries
  • primitive: Add test suite for symbolic integration
  • tests: Add test suite for symbolic differentiation
  • Factor out code to expand objects on the stack
  • make install now Installs from distribution files
  • demo: Reorganize demo files as directories
  • tests: Add test for Obj→ on various object types
  • tests: Factor out code checking state of the complete stack
  • tests: Avoid emitting something that looks like compilation errors
  • Update demo file
  • Improve definition of atomic mass unit, add Da (Dalton) alias
  • expressions: Optimize the way to split an equation
  • tests: Adjust tests after changes in SymbolicMenu

Full Changelog: v0.7.18...v0.8.0