-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why does the cube root of -8 = NaN? #635
Comments
The I filed a separate bug on this specific problem (#639) |
Please note that there is a specific |
Just curious, have you found a calculator that actually returns -2 for (-8)^(1/3)? HP41: Data error It seems to me like Thomas Okken's answer in that thread is correct: -8^(1/3) is generally understood in terms of exp and log. With a fraction type, we could probably correctly define the expression |
in my collection: TI Galaxy 67: -2 |
This release was a bit longer in coming than earlier ones, because we are about to reach the limits of what can fit on a DM42. This release uses 711228 bytes out of the 716800 (99.2%). Without the Intel Decimal Library code, we use only 282980 bytes. This means that the Intel Decimal Library code uses 60.2% of the total code space. Being able to move further requires a rather radical rethinking of the project, where we replace the Intel Decimal Library with size-optimized decimal code. As a result, release 0.5.2 will be the last one using the Intel Decimal Library, and is release in parallel with 0.6.0, which switches to a table-free and variable-precisions implementation of decimal code that uses much less code space. The two releases should otherwise be functionally identical **New features** * Shift and rotate instructions (#622) * Add `CompatibleTypes` and `DetsailedTypes` setting to control `Type` results * Recognize HP-compatible negative values for flags, e.g. `-64 SF` (#625) * Add settings to control multiline result and stack display (#634) **Bug fixes** * Truncate to `WordSize` the small results of binary operations (#624) * Fix day-of-week shortcut in simulator * Avoid double-evaluation of immediate commands when there is no help * Generate an error when selecting base 1 (#628) * Avoid `Number too big` error on based nunbers * Correctly garbage-collect menu entries (#630) * Select default settings that allow solver to find solutions (#627) * Fix display of decimal numbers (broken by multi-line display) * Fix rendering of menu entries for `Fix`, `Std`, etc * Detect non-finite results in arithmetic, e.g. `(-8)^0.3`m (#635, #639) * Fix range-checking for `Dig` to allow `-1` value * Accept large values for `Fix`, `Sci` and `Eng` (for variable precision) * Restore missing last entry in built-in units menu (#638) * Accept `Hz` and non-primary units as input for `ConvertToUnitPrefix` (#640) * Fix LEB128 encoding for signed value 64 and similar (#642) * Do not parse `IfThenElse` as a command * Do not consider `E` as a digit in decimal numbers (#643) * Do not parse `min` as a function in units, but as minute (#644) **Improvements** * Add `OnesComplement` flag for binary operation (not used yet) * Add `ComplexResults` (-103) flag (not used yet) * Accept negative values for `B→R` (according to `WordSize`) * Add documentation for `STO` and `RCL` accessing flash storage * Mention `True` and `False` in documentation * Rename `MaxBigNumBits` to `MaxNumberBits` * Return HP-compatible values from `Type` function * Minor optimization of flags implementation * Catalog auto-completion now suggests all possible spellings (#626) * Add aliases for `CubeRoot` and `Hypothenuse` * Align based number promotion rules to HP calculators (#629) * Expand the range of garbage collector integrity check on simulator * Show command according to preferences in error messages (#633) * Avoid crash in `debug_printf` if used before font initialization * Update performance data in documentation * Add ability to disable any reference to Intel Decimal Floating-point library * Simplify C++ notations for safe pointers (`+x` and `operartor bool()`) * Fix link to old `db48x` project in `README.md` Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This release was a bit longer in coming than earlier ones, because we are about to reach the limits of what can fit on a DM42. This release uses 711228 bytes out of the 716800 (99.2%). Without the Intel Decimal Library code, we use only 282980 bytes. This means that the Intel Decimal Library code uses 60.2% of the total code space. Being able to move further requires a rather radical rethinking of the project, where we replace the Intel Decimal Library with size-optimized decimal code. As a result, release 0.5.2 will be the last one using the Intel Decimal Library, and is release in parallel with 0.6.0, which switches to a table-free and variable-precisions implementation of decimal code that uses much less code space. The two releases should otherwise be functionally identical **New features** * Shift and rotate instructions (#622) * Add `CompatibleTypes` and `DetsailedTypes` setting to control `Type` results * Recognize HP-compatible negative values for flags, e.g. `-64 SF` (#625) * Add settings to control multiline result and stack display (#634) **Bug fixes** * Truncate to `WordSize` the small results of binary operations (#624) * Fix day-of-week shortcut in simulator * Avoid double-evaluation of immediate commands when there is no help * Generate an error when selecting base 1 (#628) * Avoid `Number too big` error on based nunbers * Correctly garbage-collect menu entries (#630) * Select default settings that allow solver to find solutions (#627) * Fix display of decimal numbers (broken by multi-line display) * Fix rendering of menu entries for `Fix`, `Std`, etc * Detect non-finite results in arithmetic, e.g. `(-8)^0.3`m (#635, #639) * Fix range-checking for `Dig` to allow `-1` value * Accept large values for `Fix`, `Sci` and `Eng` (for variable precision) * Restore missing last entry in built-in units menu (#638) * Accept `Hz` and non-primary units as input for `ConvertToUnitPrefix` (#640) * Fix LEB128 encoding for signed value 64 and similar (#642) * Do not parse `IfThenElse` as a command * Do not consider `E` as a digit in decimal numbers (#643) * Do not parse `min` as a function in units, but as minute (#644) **Improvements** * Add `OnesComplement` flag for binary operation (not used yet) * Add `ComplexResults` (-103) flag (not used yet) * Accept negative values for `B→R` (according to `WordSize`) * Add documentation for `STO` and `RCL` accessing flash storage * Mention `True` and `False` in documentation * Rename `MaxBigNumBits` to `MaxNumberBits` * Return HP-compatible values from `Type` function * Minor optimization of flags implementation * Catalog auto-completion now suggests all possible spellings (#626) * Add aliases for `CubeRoot` and `Hypothenuse` * Align based number promotion rules to HP calculators (#629) * Expand the range of garbage collector integrity check on simulator * Show command according to preferences in error messages (#633) * Avoid crash in `debug_printf` if used before font initialization * Update performance data in documentation * Add ability to disable any reference to Intel Decimal Floating-point library * Simplify C++ notations for safe pointers (`+x` and `operartor bool()`) * Fix link to old `db48x` project in `README.md` Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
I was reading https://forum.swissmicros.com/viewtopic.php?f=17&t=2820 and tried the cube root of -8 on a DM32, DM42, C47 and then I tried it on the DB48X (on a DM32)
All of them give either -2 or an imaginary number.
(ignore my mislabled stickers)
The text was updated successfully, but these errors were encountered: