Skip to content

Suggestion: to produce a numeric interval in position 3 (🟦) of each constant menu #1615

@Wiljea

Description

@Wiljea

The idea to produce a numeric interval in position 3 (ex.: 🟦ε₀) of each constant menu would allow a nice integration of the calculation/presentation of constants with the interval formalism of DB48x. The user would then be able to do range computation with these intervals. In DB48x v0.9.15, position 1 gives the algebraic symbol of the constant (ex.: 'ε₀'), position 2 gives its numeric value (ex.: 🟨ε₀ executes 'Ⓒε₀' →Num Eval) & position 3 is actually empty.

This would produce on the stack either the following RPL codes, or preferably, the corresponding numeric intervals. Here are 3 examples:

'Ⓒε₀' →Num 'Ⓢε₀' →Num →∆Range Eval @Expecting 8.85418 78188⁳⁻¹²±1.4⁳⁻²¹ F/m.
'ⒸG' →Num 'ⓈG' →Num →∆Range Eval @Expecting 6.6743⁳⁻¹¹±1.5⁳⁻¹⁵ m↑3/(s↑2·kg)
'Ⓒℏ' →Num 'Ⓢℏ' →Num →∆Range Eval @Expecting 1.05457 18176 5⁳⁻³⁴±0 J·s

where 'Ⓒε₀' represents the central value of the constant & 'Ⓢε₀' its standard uncertainty to be assembled together in a drange type interval by the RPL command '→∆Range'.

To do so there are two problems that need to be addressed in priority. The first problem is the fact that the standard uncertainty of some mathematical constants is not defined properly and gives erroneous values, for instance:

'Ⓢπ' →Num Eval @Failing 0 => gives instead 3.14159 26535 9
'Ⓢe' →Num Eval @Failing 0 => gives instead 2.71828 18284 6

The second problem relates to the impossibility to execute the following simple RPL program:

π « → CstX « "Ⓒ" CstX + Text→Algebraic →Num "Ⓢ" CstX + Text→Algebraic →Num →∆Range » » Eval
@Failing 3.14159 26535 898±0 => gives instead the result seen in problem one

ε₀ « → CstX « "Ⓒ" CstX + Text→Algebraic →Num "Ⓢ" CstX + Text→Algebraic →Num →∆Range » » Eval
@Failing 8.85418 78188⁳⁻¹²±1.4⁳⁻²¹ F/m => "Text→Algebraic error: Invalid input"

ℏ « → CstX « "Ⓒ" CstX + Text→Algebraic →Num "Ⓢ" CstX + Text→Algebraic →Num →∆Range » » Eval
@Failing 1.05457 18176 4615⁳⁻³⁴±0 J·s => "Text→Algebraic error: Invalid input"

where, in debug mode, we observe that CstX contains the expression 'ε₀' rather than just the characters ε₀ (whose TypeName indicates "expression"). And surprisingly, I have the same problem with ℏ (typename: "constant") which, unlike π, is also considered in the program as the algebraic expression 'ℏ' instead of just the symbol ℏ! Why the constants π & ℏ are treated differently? This seems incoherent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions