GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Evaluate bug with coulomb but not C or coulombs · Issue #3472 · josdejong/mathjs

Evaluate bug with coulomb but not C or coulombs #3472

New issue
Copy link
New issue
Copy link
Closed
Closed
Evaluate bug with coulomb but not C or coulombs#3472
Copy link
Labels
buggood first issueRelatively localized/straightforward changes that would provide a good introduction to mathjs codehelp wanted

Description

@costerwi
costerwi
opened on May 16, 2025
Issue body actions

Something is wrong with the evaluation of "coulomb" but "C" and "coulombs" both appear to be working.

> math.evaluate("coulomb").toString()
< "8.987551792261171e+9 (N m^2) / C^2"
> math.evaluate("C").toString()
< "C"
> math.evaluate("coulombs").toString()
< "coulombs"

Activity

  1. costerwi commented on May 16, 2025

    @costerwi
    costerwi
    on May 16, 2025
    ContributorAuthor
    More actions

    Got it: coulomb is defined in the code as both a unit and a physical constant.

    Maybe we could capitalize the Coulomb constant or rename to coulombConstant as seems to be the convention for other physical constants in the code.

  2. josdejong commented on May 21, 2025

    @josdejong
    josdejong
    on May 21, 2025
    Owner
    More actions

    I like renaming the constant into coulombConstant.

    Though we cannot use the constant like math.evaluate('coulomb'), we can use it like math.coulomb. So, to prevent introducing a breaking change I think we should keep both constants coulomb and coulombConstant for the time being (and mark the first as deprecated and don't use it anymore in the docs).

    Would you be able to create a PR to fix this Carl?

  3. josdejong
    added
    bug
    help wanted
    good first issueRelatively localized/straightforward changes that would provide a good introduction to mathjs code
    on May 28, 2025
  4. josdejong
    closed this as completedin 123d4aaon May 28, 2025
  5. josdejong
    added a commit that references this issue on May 28, 2025

    fix: josdejong#3472 rename physical constant `coulomb` to `coulombCon…

    This issue will close once commit 123d4aa is merged into the 'develop' branch.
    123d4aa
  6. josdejong commented on May 28, 2025

    @josdejong
    josdejong
    on May 28, 2025
    Owner
    More actions

    I've created coulombConstant in 123d4aa and published the fix in v14.5.1.

  7. costerwi commented on May 28, 2025

    @costerwi
    costerwi
    on May 28, 2025
    ContributorAuthor
    More actions

    Thank you!

    Reacted by Jos de Jong
  8. bornova commented on May 28, 2025

    @bornova
    bornova
    on May 28, 2025
    Contributor
    More actions

    Would it be possible to add back the help docs for coulomb until deprecated?

    math.help('coulomb').doc.description    //  Uncaught Error: No documentation found on "coulomb"

    In my app, I filter the math object to get all available constants and add a tooltip to each constant using their help docs. Now it throws an error because the coulomb constant still exists but doesn't have docs. I can handle the error manually but would be nice to keep the doc.

  9. josdejong
    added a commit that references this issue on May 29, 2025

    fix: add embedded docs for the deprecated physical constant `coulomb`…

    9431418
  10. josdejong commented on May 29, 2025

    @josdejong
    josdejong
    on May 29, 2025
    Owner
    More actions

    That's fine with me, addressed via 9431418 (not yet published).

    Reacted by Timur
  11. josdejong commented on May 30, 2025

    @josdejong
    josdejong
    on May 30, 2025
    Owner
    More actions

    The docs for the deprecated physical constant coulomb are published now in v14.5.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issueRelatively localized/straightforward changes that would provide a good introduction to mathjs codehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.