The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Class::Measure::Scientific::FX_992vb - units of measurement like the CASIO fx-992vb

VERSION

This document describes Class::Measure::Scientific::FX_992vb v0.0.5.

SYNOPSIS

    use Class::Measure::Scientific::FX_992vb;
    $m = Class::Measure::Scientific::FX_992vb->mass(1, 'u');
    print $m->kg();

DESCRIPTION

Create, compare and convert units of measurement as the CASIO fx-992vb. This has little to do with the CASIO fx-992vb itself, the hardware just provides a stable curated scope of range and precision for the 128 constants used in this module so it won't be endlessly updated with more units or more precise constants.

SUBROUTINES/METHODS

Class::Measure::Scientific::FX_992vb->new(1, 'inHg')

Constructs a new Class::Measure::Scientific::FX_992vb object. This is the same type of object as the following list of specific objects, but the specific objects might in the future be able to handle conflicting aliases for units which the generic constructor can't.

$f = Class::Measure::Scientific::FX_992vb->volume(1, 'cu');

Construct a volume object. Unit must be one of m3 for cubic meter, bbl for barrel, dry_barrel for dry barrel, bushel_uk for UK bushel, bu for bushel, cu for cup, pt_dry for dry pint, fbm for board foot, floz_uk for UK fluid ounce, floz_us for US fluid ounce, gal_uk for UK gallon, gal_us for US gallon, pk for peck, pt_uk for pint, pt_us for liquid pint, tbsp for tablespoon or tsp for teaspoon.

$f = Class::Measure::Scientific::FX_992vb->area(1, 'acre');

Construct an area object. Unit must be m2 for square meter or acre for acre.

$f = Class::Measure::Scientific::FX_992vb->length(1, 'fathom');

Construct a length object. Unit must be one of m for meter, AU for astronomical unit, ly for light-year, nmi for Nautical mile, pc for parsec, chain for chain, fathom for fathom, ft for foot, ft_us for US surveyors foot, in for inch, mil for mil (1/1000th inch), mile for mile, sm for US statute miles, yd for yard, yd_us for US yard, lambdacn for Compton wavelength of neutron, lambdacp for Compton wavelength of proton, a0 for Bohr radius or re for electron radius.

$f = Class::Measure::Scientific::FX_992vb->duration(1, 'year');

Construct a duration object. Unit must be s for seconds or year for tropical year.

$f = Class::Measure::Scientific::FX_992vb->speed(1, 'c');

Construct a speed object. Unit must be one of mps for meter per second, mph for miles per hour, kn for knot or c for the speed of light.

$f = Class::Measure::Scientific::FX_992vb->acceleration(1, 'g');

Construct an acceleration object. Unit must be one of g for acceleration of free fall or mps2 for meters per second squared.

$f = Class::Measure::Scientific::FX_992vb->angle(90, 'deg');

Construct an angle object. Unit must be one of rad for radian, deg for degree, minute for minute of arc, second for second of arc or grade for gradian.

$f = Class::Measure::Scientific::FX_992vb->mass(1, 'u');

Construct a mass object. Unit must be one of kg for kilogram, ct for metric carat, cwt_uk for UK hundredweight, cwt_us for US hundred weight, gr for grain, lb for pound, lbt for troy pound, oz for ounce, ozt for troy ounce, slug for slug, ton_uk for long ton, ton_us for short ton, m1h for mass of hydrogen atom, me for mass of electron, mn for mass of neutron, mp for mass of proton or u for atomic mass unit.

$f = Class::Measure::Scientific::FX_992vb->force(1, 'pdl');

Construct a force object. Unit must be one of N for Newton, kgf for kilogram-force, lbf for pound-force or pdl for poundal.

$f = Class::Measure::Scientific::FX_992vb->pressure(1, 'inHg');

Construct a pressure object. Unit must be one of pa for Pascal, at for technical atmosphere, atm for standard atmosphere, mH2O for meter of water, mmHg for millimeter mercury, Torr for torr, ftH2O for foot of water, inH2O for inch of water, inHg for inch of mercury or psi for pounds per square inch.

$f = Class::Measure::Scientific::FX_992vb->temperature(1, 'C');

Construct a temperature object. Unit must be one of C for degrees Celsius, F for degrees Fahrenheit or K for Kelvin.

$f = Class::Measure::Scientific::FX_992vb->energy(1, 'J');

Construct an energy object. Unit must be one of J for Joule, BTU for British thermal unit, ftlbf for foot-pound, hp for horsepower, cal15 for 15 degree calorie, calit for International calorie or calth for thermochemical calorie.

$f = Class::Measure::Scientific::FX_992vb->power(1, 'ps');

Construct a power object. Unit must be one of W for Watts, ps for metric horsepower or BTUh for BTU per hour.

$f = Class::Measure::Scientific::FX_992vb->linear_density(1, 'D');

Construct a linear density object. Unit must be one of D for Denier or kgpm for kilogram per meter.

$f = Class::Measure::Scientific::FX_992vb->field_equation(1, 'G');

Construct a field equation object. Unit must be one of G for gravitational constant or Nm2pkg2 for Newton meter squared per kilogram squared.

$f = Class::Measure::Scientific::FX_992vb->heat_capacity(1, 'BTUlbR');

Construct a heat capacity object. Unit must be one of BTUlbR (British thermal unit per pound Rankine) for specific heat capacity or JpkgK for Joule per kilogram Kelvin.

$f = Class::Measure::Scientific::FX_992vb->thermodynamic(1, 'BTUlb');

Construct a thermodynamic object. Unit must be one of BTUlb for specific internal energy or Jpkg for Joule per kilogram.

$f = Class::Measure::Scientific::FX_992vb->magnetic(1, 'muB');

Construct a magnetic object. Unit must be one of muB for Bohr magneton, mue for magnetic moment of electron, muN for nuclear magneton, mup for magnetic moment of proton or Am2 for Ampere meter squared.

$f = Class::Measure::Scientific::FX_992vb->gyromagnetic(1, 'gammap');

Construct a gyromagnetic object. Unit must be one of gammap for gyromagnetic ratio of proton, gammapalt for gyromagnetic ratio of proton in water or Am2pJs for Ampere meter squared per Joule second.

$f = Class::Measure::Scientific::FX_992vb->electromagnetic(1, 'h');

Construct a electromagnetic object. Unit must be one of h for Planck constant, hbar for Planck constant per 2 Pi or Js for Joule second.

$f = Class::Measure::Scientific::FX_992vb->spectroscopic(1, 'Rinf');

Construct a spectroscopic object. Unit must be one of Rinf for Rydberg constant for heavy atoms or pm for per meter.

$f = Class::Measure::Scientific::FX_992vb->radioactive(1, 'Ci');

Construct a radioactive object. Unit must be one of Ci for Curie or Bq for becquerel.

$f = Class::Measure::Scientific::FX_992vb->radiation(1, 'R');

Construct a radiation object. Unit must be one of R for Rontgen or Cpkg for coulomb per kilogram.

$f = Class::Measure::Scientific::FX_992vb->flux(1, 'phi0');

Construct a quantum flux object. Unit must be one of phi0 for magnetic flux quantum or Wb for weber.

$f = Class::Measure::Scientific::FX_992vb->wavelength(1, 'c1');

Construct a wavelength object. Unit must be one of c1 for first radiation constant or Wm2 for Watt meter squared.

$f = Class::Measure::Scientific::FX_992vb->wavenumber(1, 'c2');

Construct a wavenumber object. Unit must be one of c2 for second radiation constant or mK for meter Kelvin.

$f = Class::Measure::Scientific::FX_992vb->luminance(1, 'lam');

Construct a luminance object. Unit must be one of lam for lambert, flam for footlambert or cdpm2 for candela per square meter.

$f = Class::Measure::Scientific::FX_992vb->charge(1, 'e');

Construct a charge object. Unit must be one of e for elementary charge or C for coulomb.

$f = Class::Measure::Scientific::FX_992vb->electrolysis(1, 'F');

Construct an electrolysis object. Unit must be one of f for Faraday constant (lowercase to avoid conflict with Fahrenheit) or Cpmol for coulombs per mole.

$f = Class::Measure::Scientific::FX_992vb->entropy(1, 'k');

Construct an entropy object. Unit must be one of k for Boltzmann constant or JpK for Joule per Kelvin.

$f = Class::Measure::Scientific::FX_992vb->proportionality(1, 'Na');

Construct a proportionality object. Unit must be one of Na for Avogadro constant or pmol for per mole.

$f = Class::Measure::Scientific::FX_992vb->gas(1, 'R');

Construct a gas object. Unit must be one of R for molar gas constant or JpmolK for Joule per mole Kelvin.

$f = Class::Measure::Scientific::FX_992vb->mixture(1, 'Vm');

Construct a mixture object. Unit must be one of Vm for molar volume or m3pmol for cubic meter per mole.

$f = Class::Measure::Scientific::FX_992vb->isotropic(1, 'alpha');

Construct an isotropic object. Unit must be one of alpha for polarizability of molecule or Cm2pV for coulomb meter squared per Volt.

$f = Class::Measure::Scientific::FX_992vb->susceptibility(1, 'p');

Construct a susceptibility object. Unit must be one of p for dipole of molecule or Cm for coulomb meter.

$f = Class::Measure::Scientific::FX_992vb->displacement(1, 'Ds');

Construct a displacement object. Unit must be one of Ds for G. electric flux density, Ps for G. electric polarization or Cpm2 for coulomb per square meter.

Class::Measure::Scientific::FX_992vb::CONST(1);

All constants are available as the class method CONST which takes the index of the constant as argument as number from 1 to 128. This is the way the constants are recalled on the CASIO fx-992vb.

CONFIGURATION AND ENVIRONMENT

None.

DEPENDENCIES

INCOMPATIBILITIES

This module has the same incompatibilities as Class::Measure.

DIAGNOSTICS

This module uses Log::Log4perl for logging.

BUGS AND LIMITATIONS

The values are based on the constants from the CASIO fx-992vb scientific calculator from the 90s, which are based on JIS-Z-8202-1988 (Japan Industrial Standards). These are not the latest standards and should not be used when more accurate values than those displayed in a pocket calculator from that era are expected. For example the 2019 redefinition of the SI base units is not and won't be implemented in this module.

Interval scales

While the CASIO fx-992vb has the constants to convert between Celsius, Fahrenheit and Kelvin - using zero Celsius in Kelvin, zero Fahrenheit in Celsius and degree Fahrenheit in Kelvin/Celsius - Celsius and Fahrenheit are only units on interval scales as opposed to Kelvin which has a defined thermodynamic zero which makes it a unit on a ratio scale. This module does of course convert directly between those scales, but for completeness the constants used in those calculations can also be accessed as class methods.

  • Zero Celsius Class::Measure::Scientific::FX_992vb::zC() as 273.15 Kelvin

  • Zero Fahrenheit Class::Measure::Scientific::FX_992vb::zF() as -160/9 Celsius

  • Fahrenheit Kelvin ratio Class::Measure::Scientific::FX_992vb::FK() as 5/9

Dimensionless quantities

Some constants are dimensionless quantities, which means they are independent of the system of unit used and can't be used to convert between units so they are useless in the functionality of this module. These dimensionless quantity constants are listed here for completeness and are available as class methods.

  • Decibel level difference Class::Measure::Scientific::FX_992vb::dB() as 0.11512925465

  • Neper level difference Class::Measure::Scientific::FX_992vb::Np() as 8.68588963807

  • Fine-structure constant Class::Measure::Scientific::FX_992vb::a() as 7.2973506e-3

Please report any bugs or feature requests at RT for rt.cpan.org.

AUTHOR

Roland van Ipenburg, <roland@rolandvanipenburg.com>

LICENSE AND COPYRIGHT

Copyright 2020 by Roland van Ipenburg This program is free software; you can redistribute it and/or modify it under the GNU General Public License v3.0.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.