Post Reply 
WP 34S and 31S bugs and fixes
06-10-2015, 07:45 AM
Post: #201
RE: WP 34S and 31S bugs and fixes
Feel free to look at the solver's source code and submit a patch that corrects the problem. It's a keystroke program and you need to be able to write these to use it.

I doubt I've got time to dig into this in the short to mid term future.


- Pauli
Find all posts by this user
Quote this message in a reply
06-10-2015, 12:14 PM
Post: #202
RE: WP 34S and 31S bugs and fixes
(06-10-2015 07:06 AM)Marcio Wrote:  If you haven't already, please consider also taking at look at this strange behaviour in the solver.

Thanks.

Marcio

I've tested solver's behavior with the latest SVN sources and it seems to work OK. x^2-5x+6 with initial guesses 1 & 1.5 returns 2 as root. With guesses 1 & 3.5 returns 3 as root. So such bug seems to be solved.

Regards.
Find all posts by this user
Quote this message in a reply
06-10-2015, 01:06 PM (This post was last modified: 06-10-2015 01:11 PM by Marcio.)
Post: #203
RE: WP 34S and 31S bugs and fixes
(06-10-2015 12:14 PM)emece67 Wrote:  
(06-10-2015 07:06 AM)Marcio Wrote:  If you haven't already, please consider also taking at look at this strange behaviour in the solver.

Thanks.

Marcio

I've tested solver's behavior with the latest SVN sources and it seems to work OK. x^2-5x+6 with initial guesses 1 & 1.5 returns 2 as root. With guesses 1 & 3.5 returns 3 as root. So such bug seems to be solved.

Regards.

I saw that they'd edited the code but wasn't sure if this problem was addressed because I don't have a cable to update the actual machine FW and also couldn't find the latest version of the emulator.
Glad the bug got fixed.
Marcio
Find all posts by this user
Quote this message in a reply
06-10-2015, 01:24 PM
Post: #204
RE: WP 34S and 31S bugs and fixes
(06-10-2015 01:06 PM)Marcio Wrote:  ...
I don't have a cable to update the actual machine FW and also couldn't find the latest version of the emulator.

I've found that the cable, purchased or homemade, is a big source of fun.

In any case, if you are capable of compiling the emulator you can test it.

Regards.
Find all posts by this user
Quote this message in a reply
07-10-2015, 11:32 PM (This post was last modified: 07-10-2015 11:42 PM by emece67.)
Post: #205
RE: WP 34S and 31S bugs and fixes
Apparently I've found another bug.

This time it is inside function decNumberLnGamma in file decn.c. It causes the LN[GAMMA] function to crash when called with negative arguments that have an odd integer part (say -1.5, -3.5, and so on).

Problem is in lines 1853-1854 of decn.c that say:
Code:
        // Figure out S * PI mod 2PI
        decNumberMod(&u, &s, &const_2);
and must say:
Code:
        // Figure out xin * PI mod 2PI
        decNumberMod(&u, xin, &const_2);
(&s is not initialized, this causes the issue).

Regards.
Find all posts by this user
Quote this message in a reply
07-10-2015, 11:56 PM
Post: #206
RE: WP 34S and 31S bugs and fixes
Thanks for the fix. I've committed it to the repository and trimmed the ln Gamma code a bit.

- Pauli
Find all posts by this user
Quote this message in a reply
07-17-2015, 01:33 PM
Post: #207
RE: WP 34S and 31S bugs and fixes
(07-10-2015 11:56 PM)Paul Dale Wrote:  Thanks for the fix. I've committed it to the repository and trimmed the ln Gamma code a bit.

A new build must wait until the repository is accessible again.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
08-27-2015, 11:06 AM (This post was last modified: 08-27-2015 03:22 PM by 2far.)
Post: #208
RE: WP 34S and 31S bugs and fixes
On the WP-31S there is an unexpected display of thousands separators when using the SHOW feature (displaying all 16 digits used internally).

DISP settings: RDX. / TSOFF (thousands separators disabled)

2 [SHOW]
2.000,000,000,000,000 E000

Shouldn't the separators only show with TSON set (thousands separators enabled)? I figured they are showing after the decimal mark because there is always only one digit before decimal mark in this display ... otherwise I wouldn't have expected them to ever show.

-Greg
Find all posts by this user
Quote this message in a reply
08-27-2015, 04:09 PM (This post was last modified: 08-27-2015 09:49 PM by 2far.)
Post: #209
RE: WP 34S and 31S bugs and fixes
(08-27-2015 11:06 AM)2far Wrote:  Shouldn't the separators only show with TSON set (thousands separators enabled)? I figured they are showing after the decimal mark because there is always only one digit before decimal mark in this display ... otherwise I wouldn't have expected them to ever show.

After some thought I guess this grouping might be useful because there are always 16 digits shown, so never mind. Thanks for all the good work. I really enjoy the hardware version!
The grouping after the decimal mark really did surprise me at first ...
Find all posts by this user
Quote this message in a reply
08-27-2015, 08:08 PM (This post was last modified: 08-27-2015 08:09 PM by BarryMead.)
Post: #210
RE: WP 34S and 31S bugs and fixes
(08-27-2015 04:09 PM)2far Wrote:  [quote='2far' pid='41165' dateline='1440673566']
Shouldn't the separators only show with TSON set (thousands separators enabled)? I figured they are showing after the decimal mark because there is always only one digit before decimal mark in this display ... otherwise I wouldn't have expected them to ever show.

I think the idea of the "Show" feature in the 31s is the same as that show digits "f x<>y" feature of the wp34s. These display modes are designed to show "ALL" of the number to the full significance of the decimal number floating point system. Since people often use these display modes to write down the numbers in a report or log, the separators help prevent errors while copying down the numbers.
Think of it as an alternative way to display the number so that it can be copied down more accurately.
Find all posts by this user
Quote this message in a reply
08-27-2015, 09:55 PM
Post: #211
RE: WP 34S and 31S bugs and fixes
(08-27-2015 08:08 PM)BarryMead Wrote:  Think of it as an alternative way to display the number so that it can be copied down more accurately.

Thanks, that makes sense there! (I haven't used it in a real-world scenario)
Find all posts by this user
Quote this message in a reply
09-13-2015, 02:37 AM
Post: #212
RE: WP 34S and 31S bugs and fixes
I see that NIST has a new list of CODATA 2014 recommended values of physical constants.
As such, I propose that compile_consts.c be edited to include the new values.

specifically, lines ~218-~278 be amended to read:
Code:

struct _constsml constsml[] = {
//from CODATA 2014 recommended values 25 June 2015
    CONSTANT("#",        "ZERO",        "0"),            // Zero & placeholder for small integers
    CONSTANT("a",        "PC_a",        "365.2425"),        // Days in a Gregorian year
    CONSTANT("a\270",    "PC_a0",    "5.2917721067E-11"),    // Bohr radius
    CONSTANT("c",        "PC_C",        "299792458"),        // Speed of light in a vacuum
    CONSTANT("c\271",    "PC_C1",    "3.741771790E-16"),    // First radiation constant
    CONSTANT("c\272",    "PC_C2",    "1.43877736E-2"),        // Second radiation constant
    CONSTANT("F",        "PC_F",        "96485.33289"),        // Faraday's constant
    CONSTANT("g",        "PC_g",        "9.80665"),        // Standard Earth acceleration
    CONSTANT("G",        "PC_G",        "6.67408E-11"),        // NIST 2010, IAU 2009 gives 6.67428E-11
    CONSTANT("G\270",    "PC_Go",    "7.7480917310E-5"),    // Conductace quantum
    CONSTANT("g\274",    "PC_Ge",    "-2.00231930436182"),    // Lande's electon g-factor
    CONSTANT("k",        "PC_k",        "1.38064852E-23"),    // Boltzmann constant
    CONSTANT("Kj",        "PC_Jk",    "483597.8525E9"),    // Josephson constant
    CONSTANT("N\327",    "PC_Na",    "6.022140857E23"),    // Avogadro's number
    CONSTANT("p\270",    "PC_atm",    "101325"),        // Standard atmospheric pressure
    CONSTANT("R",        "PC_R",        "8.3144598"),        // Molar gas constant
    CONSTANT("R\367",    "PC_Rk",    "25812.8074555"),    // von Klitzing's constant
    CONSTANT("R\233",    "PC_Rinf",    "10973731.568508"),    // Rydberg constant
    CONSTANT("T\270",    "PC_t",        "273.15"),        // 0 degree celcus, standard temperature
    CONSTANT("V\033",    "PC_Vm",    "22.413962E-3"),    // Molar volume of an ideal gas at STP
    CONSTANT("Z\270",    "PC_Zo",    "376.73031346177065546819840042031930826862350835241865523"),    // Characteristic impedance of vacuum
    CONSTANT("\240",    "PC_alpha",    "7.2973525664E-3"),    // Fine-structure constant
    CONSTANT("\242\276",    "PC_gamP",    "2.675221900E8"),    // Proton gyromagnetic ratio
    CONSTANT("\244\270",    "PC_eps0",    "8.8541878176203898505365630317107502606083701665994498E-12"),    // Electric constant, vacuum permittivity
    CONSTANT("\253\270",    "PC_mu0",    "12.566370614359172953850573533118011536788677597500423E-7"),    // Magnetic constant
    CONSTANT("\253\230",    "PC_muB",    "927.4009994E-26"),    // Bohr's magneton
    CONSTANT("\253\277",    "PC_mu_u",    "5.050783699E-27"),    // Nuclear magneton
    CONSTANT("\261\230",    "PC_sigma",    "5.670367E-8"),        // Stefan Boltzmann constant
    CONSTANT("\224\270",    "PC_phi0",    "2.067833831E-15"),    // Magnetic flux quantum

    /* Plank related constants */
    CONSTANT("h",        "PC_PLANK",    "6.626070040E-34"),    // Planck's constant
    CONSTANT("\236",    "PC_hon2PI",    "1.054571800E-34"),    // Planck's constant over 2 pi.
    CONSTANT("l\276",    "PC_PlanckL",    "1.616229E-35"),    // Base Planck unit of length
    CONSTANT("M\276",    "PC_PlanckM",    "2.176470E-8"),        // Base Planck unit of mass
/**/    CONSTANT("q\276",    "PC_PlanckQ",    "1.8755460e-18"),    // Base Planck unit of charge
    CONSTANT("T\276",    "PC_PlanckTh",    "1.416808E32"),        // Base Planck unit of temperature
    CONSTANT("t\276",    "PC_tp",    "5.39116E-44"),        // Base Planck unit of time

    /* Atomic constants */
    CONSTANT("e",        "PC_eV",    "1.6021766208E-19"),    // Electron Charge
    CONSTANT("r\274",    "PC_Re",    "2.8179403227E-15"),    // Classical electron radius
    CONSTANT("m\274",    "PC_me",    "9.10938356E-31"),    // Electron mass
    CONSTANT("m\275",    "PC_mn",    "1.674927471E-27"),    // Neutron mass
    CONSTANT("m\276",    "PC_mp",    "1.672621898E-27"),    // Proton mass
    CONSTANT("m\277",    "PC_mu",    "1.660539040E-27"),    // Atomic mass unit
    CONSTANT("m\231",    "PC_mMu",    "1.883531594E-28"),    // Muon mass
//    CONSTANT("m\274c\232",    "PC_mec2",    "8.18710565E-14"),    // Electron mass by c^2
//    CONSTANT("m\275c\232",    "PC_mnc2",    "1.505349739E-10"),    // Neutron mass by c^2
//    CONSTANT("m\276c\232",    "PC_mpc2",    "1.503277593E-10"),    // Proton mass by c^2
    CONSTANT("m\277c\232",    "PC_muc2",    "1.492418062E-10"),    // Atomic mass unit by c^2
//    CONSTANT("m\231c\232",    "PC_mMuc2",    "1.692833774E-11"),    // Muon mass by c^2
    CONSTANT("\252\273",    "PC_lamC",    "2.4263102367E-12"),    // Compton wavelength of the electron
    CONSTANT("\252\273\275","PC_lamCn",    "1.31959090481E-15"),    // Compton wavelength of the neutron
    CONSTANT("\252\273\276","PC_lamCp",    "1.32140985396E-15"),    // Compton wavelength of the proton
    CONSTANT("\253\274",    "PC_muE",    "-928.4764620E-26"),    // Electron magnetic moment
    CONSTANT("\253\275",    "PC_mun",    "-0.96623650E-26"),    // Neutron magnetic moment
    CONSTANT("\253\276",    "PC_muP",    "1.4106067873E-26"),    // Proton magnetic moment
    CONSTANT("\253\231",    "PC_mumu",    "-4.49044826E-26"),    // Muon magnetic moment

Since I'm just getting started here, I have not committed these changes.
Find all posts by this user
Quote this message in a reply
09-13-2015, 03:08 AM
Post: #213
RE: WP 34S and 31S bugs and fixes
I'm having trouble diffing these changes -- the space has been mangled.

- Pauli
Find all posts by this user
Quote this message in a reply
09-13-2015, 03:33 AM
Post: #214
RE: WP 34S and 31S bugs and fixes
Please see attached--should be easier this way.

https://www.diffchecker.com/r0s4vsz0

for attachment, remove '.txt' extension--cannot attach '.c' files


Attached File(s)
.txt  compile_consts.c.txt (Size: 31.69 KB / Downloads: 7)
Find all posts by this user
Quote this message in a reply
09-13-2015, 04:21 AM
Post: #215
RE: WP 34S and 31S bugs and fixes
Thanks for that. The changes look good.

- Pauli
Find all posts by this user
Quote this message in a reply
09-23-2015, 06:19 AM
Post: #216
RE: WP 34S and 31S bugs and fixes
Not very sure about the expected behaviour of the AGM (arithmetic-geometric mean) function when one or two of the arguments is a negative number, but both my machine and the (Qt) emulator loop forever.

Regards.
Find all posts by this user
Quote this message in a reply
09-23-2015, 06:51 AM
Post: #217
RE: WP 34S and 31S bugs and fixes
Yep, a bug. It ends up doing sqrt(negative) which is a NaN which stops the loop terminating.

Fix committed. It will be in the next build.


- Pauli
Find all posts by this user
Quote this message in a reply
09-23-2015, 08:54 AM
Post: #218
RE: WP 34S and 31S bugs and fixes
Thirty two minute bug fix time -- a new record for the 34S project.

Smile

- Pauli
Find all posts by this user
Quote this message in a reply
09-23-2015, 09:56 PM
Post: #219
RE: WP 34S and 31S bugs and fixes
Thanks!
Find all posts by this user
Quote this message in a reply
10-01-2015, 03:37 PM (This post was last modified: 10-01-2015 03:38 PM by fhub.)
Post: #220
RE: WP 34S and 31S bugs and fixes
(09-23-2015 08:54 AM)Paul Dale Wrote:  Thirty two minute bug fix time -- a new record for the 34S project.
Smile

Still no build eight days after a bug fix -- also a new record for the 34S project.
Sad

Franz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 5 Guest(s)