Lurker News
Hi HN

It also supports percentages, dates and variables.
I've been working on this alone for a few years now, so would love to get some feedback.

Comments (239) 97 threads

Show all comments

Showing thread 18 of 97

joeframbach1 reply#
I'm trying to figure out how many "miles per hour" I get while charging my vehicle. I have a 3.3KW charger and I average 3.1 miles per KWh while driving. I expect that I am charging at a rate of 10.23 miles per hour.

So

    3.3 KW * 3.1 miles per KWh
Says "3.3". The math is wrong and the units are gone.

Actually, it doesn't seem to understand the concept of a KW. I'll try "kilowatt" and "kilowatt-hour" respectively.

    3.3 kilowatt * 3.1 miles per kilowatt-hour
Says "Incompatible units".

The closest I got was

    3.3 kilowatt * 3.1 miles per kiloWh
Says "10.23 kW mi".

insect.sh is able to do that last one.

    3.3 kilowatt * 3.1 miles per kiloWh
    3.3 kW × (3.1 mi / kW·h)
    = 10.23 mi/h
xaos#
The "kilo" prefix is a lowercase k. If you fix that, it works perfectly: "3.3 kW * 3.1 miles per kWh"

Gives "10.23 kW mi / kWh" as you expected
I guess ideally you would want it to factor out the kW.