sharkdp / numbat

A statically typed programming language for scientific computations with first class support for physical dimensions and units
https://numbat.dev
Apache License 2.0
1.16k stars 49 forks source link

logaritmic operations with units and decibel #387

Open mikehanus opened 7 months ago

mikehanus commented 7 months ago

Hi,

first I would like to express my gratitude and love to this tool.

But one things that is missing for me is decibel units and operations like this:

>>> 100 W -> dBW
  = 20 dBW
>>> ans - 60 dBm
  = -10 dB
>>> ans -> W/W
  = 0.1 W/W

Is there plan or possibility of implementation?

From my brief overview of code log and log10 functions only take scalar numbers as inputs.

Thank you

sharkdp commented 6 months ago

Thank you for the feedback!

Did you see https://github.com/sharkdp/numbat/issues/217?