http://zorba.io/modules/excel/engineering

View as XML or JSON.

This is a library module offering the same set of functions defined by Microsoft Excel, under Engineering Functions.

Function Summary

bin2dec ($arg as xs:anyAtomicType) as xs:integer

Converts a binary number to decimal.

bin2hex ($arg as xs:anyAtomicType) as xs:string

Converts a binary number to hexadecimal.

bin2hex ($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string

Converts a binary number to hexadecimal.

bin2oct ($arg as xs:anyAtomicType) as xs:string

Converts a binary number to octal.

bin2oct ($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string

Converts a binary number to octal.

dec2bin ($arg as xs:anyAtomicType) as xs:string

Converts a decimal number to binary.

dec2bin ($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string

Converts a decimal number to binary.

dec2hex ($arg as xs:anyAtomicType) as xs:string

Converts a decimal number to hexadecimal.

dec2hex ($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string

Converts a decimal number to hexadecimal.

dec2oct ($arg as xs:anyAtomicType) as xs:string

Converts a decimal number to octal.

dec2oct ($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string

Converts a decimal number to octal.

hex2bin ($arg as xs:anyAtomicType) as xs:string

Converts a hexadecimal number to binary.

hex2bin ($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string

Converts a hexadecimal number to binary.

hex2dec ($arg as xs:string) as xs:integer

Converts a hexadecimal number to decimal.

hex2oct ($arg as xs:anyAtomicType) as xs:string

Converts a hexadecimal number to octal.

hex2oct ($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string

Converts a hexadecimal number to octal.

oct2bin ($arg as xs:anyAtomicType) as xs:string

Converts an octal number to binary.

oct2bin ($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string

Converts an octal number to binary.

oct2dec ($arg as xs:anyAtomicType) as xs:integer

Converts an octal number to decimal.

oct2hex ($arg as xs:anyAtomicType) as xs:string

Converts an octal number to hexadecimal.

oct2hex ($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string

Converts an octal number to hexadecimal.

Functions

bin2dec#1

declare  function excel-engineering:bin2dec($arg as xs:anyAtomicType) as xs:integer
Converts a binary number to decimal.

Parameters

arg as xs:anyAtomicType
the number.

Returns

xs:integer
A decimal representation of a number given it's binary representation.

bin2hex#1

declare  function excel-engineering:bin2hex($arg as xs:anyAtomicType) as xs:string
Converts a binary number to hexadecimal.

Parameters

arg as xs:anyAtomicType
the number.

Returns

xs:string
A hexadecimal representation of a number given it's binary representation.

bin2hex#2

declare  function excel-engineering:bin2hex($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string
Converts a binary number to hexadecimal.

Parameters

arg as xs:anyAtomicType
the number.
places as xs:anyAtomicType
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).

Returns

xs:string
A hexadecimal representation of a number given it's binary representation.

bin2oct#1

declare  function excel-engineering:bin2oct($arg as xs:anyAtomicType) as xs:string
Converts a binary number to octal.

Parameters

arg as xs:anyAtomicType
the number.

Returns

xs:string
A octal representation of a number given it's binary representation.

bin2oct#2

declare  function excel-engineering:bin2oct($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string
Converts a binary number to octal.

Parameters

arg as xs:anyAtomicType
the number.
places as xs:anyAtomicType
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).

Returns

xs:string
A octal representation of a number given it's binary representation.

dec2bin#1

declare  function excel-engineering:dec2bin($arg as xs:anyAtomicType) as xs:string
Converts a decimal number to binary.

Parameters

arg as xs:anyAtomicType
the number.

Returns

xs:string
A binary representation of a number given it's decimal representation.

dec2bin#2

declare  function excel-engineering:dec2bin($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string
Converts a decimal number to binary.

Parameters

arg as xs:anyAtomicType
the number.
places as xs:anyAtomicType
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).

Returns

xs:string
A binary representation of a number given it's decimal representation.

dec2hex#1

declare  function excel-engineering:dec2hex($arg as xs:anyAtomicType) as xs:string
Converts a decimal number to hexadecimal.

Parameters

arg as xs:anyAtomicType
the number.

Returns

xs:string
A hexadecimal representation of a number given it's decimal representation.

dec2hex#2

declare  function excel-engineering:dec2hex($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string
Converts a decimal number to hexadecimal.

Parameters

arg as xs:anyAtomicType
the number.
places as xs:anyAtomicType
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).

Returns

xs:string
A hexadecimal representation of a number given it's decimal representation.

dec2oct#1

declare  function excel-engineering:dec2oct($arg as xs:anyAtomicType) as xs:string
Converts a decimal number to octal.

Parameters

arg as xs:anyAtomicType
the number.

Returns

xs:string
An octal representation of a number given it's decimal representation.

dec2oct#2

declare  function excel-engineering:dec2oct($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string
Converts a decimal number to octal.

Parameters

arg as xs:anyAtomicType
the number
places as xs:anyAtomicType
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).

Returns

xs:string
An octal representation of a number given it's decimal representation.

hex2bin#1

declare  function excel-engineering:hex2bin($arg as xs:anyAtomicType) as xs:string
Converts a hexadecimal number to binary.

Parameters

arg as xs:anyAtomicType
the number.

Returns

xs:string
A binary representation of a number given it's hexadecimal representation.

hex2bin#2

declare  function excel-engineering:hex2bin($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string
Converts a hexadecimal number to binary.

Parameters

arg as xs:anyAtomicType
the number.
places as xs:anyAtomicType
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).

Returns

xs:string
A binary representation of a number given it's hexadecimal representation.

hex2dec#1

declare  function excel-engineering:hex2dec($arg as xs:string) as xs:integer
Converts a hexadecimal number to decimal.

Parameters

arg as xs:string
the number.

Returns

xs:integer
A decimal representation of a number given it's hexadecimal representation.

hex2oct#1

declare  function excel-engineering:hex2oct($arg as xs:anyAtomicType) as xs:string
Converts a hexadecimal number to octal.

Parameters

arg as xs:anyAtomicType
the number.

Returns

xs:string
A octal representation of a number given it's hexadecimal representation.

hex2oct#2

declare  function excel-engineering:hex2oct($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string
Converts a hexadecimal number to octal.

Parameters

arg as xs:anyAtomicType
the number.
places as xs:anyAtomicType
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).

Returns

xs:string
A octal representation of a number given it's hexadecimal representation.

oct2bin#1

declare  function excel-engineering:oct2bin($arg as xs:anyAtomicType) as xs:string
Converts an octal number to binary.

Parameters

arg as xs:anyAtomicType
the number.

Returns

xs:string
A binary representation of a number given it's octal representation.

oct2bin#2

declare  function excel-engineering:oct2bin($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string
Converts an octal number to binary.

Parameters

arg as xs:anyAtomicType
the number.
places as xs:anyAtomicType
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).

Returns

xs:string
A binary representation of a number given it's octal representation.

oct2dec#1

declare  function excel-engineering:oct2dec($arg as xs:anyAtomicType) as xs:integer
Converts an octal number to decimal.

Parameters

arg as xs:anyAtomicType
the number.

Returns

xs:integer
A decimal representation of a number given it's octal representation.

oct2hex#1

declare  function excel-engineering:oct2hex($arg as xs:anyAtomicType) as xs:string
Converts an octal number to hexadecimal.

Parameters

arg as xs:anyAtomicType
the number.

Returns

xs:string
A hexadecimal representation of a number given it's octal representation.

oct2hex#2

declare  function excel-engineering:oct2hex($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string
Converts an octal number to hexadecimal.

Parameters

arg as xs:anyAtomicType
the number.
places as xs:anyAtomicType
is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).

Returns

xs:string
A hexadecimal representation of a number given it's octal representation.