UCS::Expression::Func - Utility functions for UCS expressions
use UCS::Expression::Func;
$min_x = min($x1, $x2, ...); # minimum of two or more values
$max_y = max(@y); # maximum of two or more values
$log_prob = -log10($prob); # base 10 logarithm
$log_prob = inf() # replace log(Infinity) = -log(0)
if $prob == 0; # by a very large value
This module provides a collection of simple but useful functions, which are automatically imported into the UCS::Expression namespace so that they can be used in UCS expressions without full qualification.
@x
.@x
.-inf()
if $prob is zero or negative.-inf()
, as does the log10 function. In order to find out the exact value on your system, you can use the command line ucs-config -e 'print inf(),"\n"'
Copyright 2004 Stefan Evert.
This software is provided AS IS and the author makes no warranty as to its use and performance. You may use the software, redistribute and modify it under the same terms as Perl itself.