---
name: "Tree::XPathEngine::Number"
section: "3pm"
platform: "linux"
package: "libtree-xpathengine-perl"
version: "0.05-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Tree::XPathEngine::Number"
---

# Tree::XPathEngine::Number(3pm)

Simple numeric values.

## NAME

Tree::XPathEngine::Number - Simple numeric values.

## DESCRIPTION

This class holds simple numeric values. It doesn't support -0, +/- Infinity, or NaN, as the XPath spec says it should, but I'm not hurting anyone I don't think.

## API

### new($num)

Creates a new Tree::XPathEngine::Number object, with the value in `$num`. Does some rudimentary numeric checking on `$num` to ensure it actually is a number.

### value()

Also as overloaded stringification. Returns the numeric value held.

### Other Methods

Those are needed so the objects can be properly processed in various contexts

- as\_string

  - as\_xml

  - value

  - xpath\_cmp

  - evaluate

  - xpath\_to\_boolean

  - xpath\_to\_literal

  - xpath\_to\_number

  - xpath\_string\_value
