Raises an LALUnit
structure to a specified rational power.
This function raises the LALUnit
structure *input
to the rational power *power
. In this way, units such as \(\mathrm{s}^{1/2}\) and \(\mathrm{m}^{-1}\) can be created using existing units.
The function first multiplies the overall power of ten input->powerOfTen
by the rational number *power
, checking to make sure that the resulting power is still an integer. It then multiplies each of the rational powers in *input
by *power
by naïve multiplication of rational numbers
\[ \left(\frac{N_1}{1+D_1}\right)\left( \frac{N_2}{1+D_2} \right) = \frac{N_1 N_2}{1 + (1+D_1)(1+D_2)-1} \]
and then calls XLALUnitNormalize()
to bring the result into standard form.
Prototypes | |
LALUnit * | XLALUnitRaiseRAT4 (LALUnit *output, const LALUnit *input, const RAT4 *power) |
Raises a LALUnit structure to a rational power given by the RAT4 structure power . More... | |
LALUnit * | XLALUnitRaiseINT2 (LALUnit *output, const LALUnit *input, INT2 power) |
Raises a LALUnit structure to an integer power power . More... | |
LALUnit * | XLALUnitSquare (LALUnit *output, const LALUnit *input) |
Produces the square of a LALUnit structure. More... | |
LALUnit * | XLALUnitSqrt (LALUnit *output, const LALUnit *input) |
Produces the square-root of a LALUnit structure. More... | |
LALUnit * | XLALUnitInvert (LALUnit *output, const LALUnit *input) |
UNDOCUMENTED. More... | |
Raises a LALUnit
structure to a rational power given by the RAT4
structure power
.
Definition at line 56 of file UnitRaise.c.
Raises a LALUnit
structure to an integer power power
.
Definition at line 106 of file UnitRaise.c.
Produces the square of a LALUnit
structure.
Definition at line 120 of file UnitRaise.c.
Produces the square-root of a LALUnit
structure.
Definition at line 133 of file UnitRaise.c.
UNDOCUMENTED.
Definition at line 144 of file UnitRaise.c.