I am doing some Bitcoin calculations where I enter integer values (Satoshis) and then need to multiply them by 10**-8 to get the value in Bitcoins, e.g. to calculate price in US dollars.

I don’t see how to do this other than by saving 0.00000001 in my clipboard.

I sort of got positive exponents to work, but the exponent functionality disappears as soon as I type a minus sign for the exponent for 10**-8 because it gets interpreted as a subtraction operator instead of as a unary sign.

I can just divide by 10**8 which works, but it’s not quite as intuitive for me.

Is there a better way to do this?

Is this a bug?

I’m using Kcalc 23.04.3 in a flatpak on Kubuntu 22.04.

  • megane-kun@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    3
    ·
    18 days ago

    I’m using KCalc version 24.05.0 but I suppose it’s similar enough to your version.

    I typed in the following in simple mode:

    <value> * 10^-8
    

    I even got results with the following:

    <value>e-8
    

    With pushing buttons in science mode I managed to replicate what you’ve observed, so I guess it’s indeed a bug? However, typing something like either of the two sequences above would give you the desired result.

    As an aside, it seems like typing things directly into the input text box like sin(30) can be done in any mode. I don’t know if it can be generalized though, and I don’t know if all of the buttons in Science and Stat modes have a plaintext equivalent you can just type in.

  • blueday@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    18 days ago

    I’m on kcalc 22.12.3, so maybe something changed. If I click the negative sign after clicking the 8, it works for me. So workflow in science mode: 5 x 10 Xy 8 +/- Enter.

    And after typing all this I realize you probably meant using the keyboard. If so, use Backslash after typing the exponent to make it negative.

    • josephj11@lemmy.kde.socialOP
      link
      fedilink
      arrow-up
      3
      ·
      18 days ago

      Thanks. That and megane-kun’s solutions work, now that I know about the backslash key.

      BTW, IDK about Kcalc 22, but Kcalc 23 rocks because they added history to it. If you type Ctrl+h, it opens a panel that shows all the past results since the last AC. That’s why I’m using the flatpak to get it. It makes the calculator much easier to use and when I get ridiculous results, it shows me what I actually typed instead of what I meant to type.