# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0.  If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.

# This file was generated by using the script sql_decimal.mal.sh.

command calc.bte(v:flt, digits:int, scale:int) :bte
address flt_num2dec_bte
comment "cast number to decimal(bte) and check for overflow";

command batcalc.bte(v:bat[:flt], digits:int, scale:int) :bat[:bte]
address batflt_num2dec_bte
comment "cast number to decimal(bte) and check for overflow";

command calc.bte(v:dbl, digits:int, scale:int) :bte
address dbl_num2dec_bte
comment "cast number to decimal(bte) and check for overflow";

command batcalc.bte(v:bat[:dbl], digits:int, scale:int) :bat[:bte]
address batdbl_num2dec_bte
comment "cast number to decimal(bte) and check for overflow";

command calc.sht(v:flt, digits:int, scale:int) :sht
address flt_num2dec_sht
comment "cast number to decimal(sht) and check for overflow";

command batcalc.sht(v:bat[:flt], digits:int, scale:int) :bat[:sht]
address batflt_num2dec_sht
comment "cast number to decimal(sht) and check for overflow";

command calc.sht(v:dbl, digits:int, scale:int) :sht
address dbl_num2dec_sht
comment "cast number to decimal(sht) and check for overflow";

command batcalc.sht(v:bat[:dbl], digits:int, scale:int) :bat[:sht]
address batdbl_num2dec_sht
comment "cast number to decimal(sht) and check for overflow";

command calc.int(v:flt, digits:int, scale:int) :int
address flt_num2dec_int
comment "cast number to decimal(int) and check for overflow";

command batcalc.int(v:bat[:flt], digits:int, scale:int) :bat[:int]
address batflt_num2dec_int
comment "cast number to decimal(int) and check for overflow";

command calc.int(v:dbl, digits:int, scale:int) :int
address dbl_num2dec_int
comment "cast number to decimal(int) and check for overflow";

command batcalc.int(v:bat[:dbl], digits:int, scale:int) :bat[:int]
address batdbl_num2dec_int
comment "cast number to decimal(int) and check for overflow";

command calc.lng( v:flt, digits:int, scale:int ) :lng
address flt_num2dec_lng
comment "cast number to decimal(lng) and check for overflow";

command batcalc.lng(v:bat[:flt], digits:int, scale:int) :bat[:lng]
address batflt_num2dec_lng
comment "cast number to decimal(lng) and check for overflow";

command calc.lng(v:dbl, digits:int, scale:int) :lng
address dbl_num2dec_lng
comment "cast number to decimal(lng) and check for overflow";

command batcalc.lng(v:bat[:dbl], digits:int, scale:int) :bat[:lng]
address batdbl_num2dec_lng
comment "cast number to decimal(lng) and check for overflow";

command calc.bte(v:bte, digits:int, scale:int) :bte
address bte_num2dec_bte
comment "cast number to decimal(bte) and check for overflow";

command batcalc.bte(v:bat[:bte], digits:int, scale:int) :bat[:bte]
address batbte_num2dec_bte
comment "cast number to decimal(bte) and check for overflow";

command calc.bte(s1:int, v:bte) :bte
address bte_dec2_bte
comment "cast decimal(bte) to bte and check for overflow";
command calc.bte(s1:int, v:bte, d2:int, s2:int) :bte
address bte_dec2dec_bte
comment "cast decimal(bte) to decimal(bte) and check for overflow";

command batcalc.bte(s1:int, v:bat[:bte]) :bat[:bte]
address batbte_dec2_bte
comment "cast decimal(bte) to bte and check for overflow";
command batcalc.bte(s1:int, v:bat[:bte], d2:int, s2:int) :bat[:bte]
address batbte_dec2dec_bte
comment "cast decimal(bte) to decimal(bte) and check for overflow";

command calc.bte(v:sht, digits:int, scale:int) :bte
address sht_num2dec_bte
comment "cast number to decimal(bte) and check for overflow";

command batcalc.bte(v:bat[:sht], digits:int, scale:int) :bat[:bte]
address batsht_num2dec_bte
comment "cast number to decimal(bte) and check for overflow";

command calc.bte(s1:int, v:sht) :bte
address sht_dec2_bte
comment "cast decimal(sht) to bte and check for overflow";
command calc.bte(s1:int, v:sht, d2:int, s2:int) :bte
address sht_dec2dec_bte
comment "cast decimal(sht) to decimal(bte) and check for overflow";

command batcalc.bte(s1:int, v:bat[:sht]) :bat[:bte]
address batsht_dec2_bte
comment "cast decimal(sht) to bte and check for overflow";
command batcalc.bte(s1:int, v:bat[:sht], d2:int, s2:int) :bat[:bte]
address batsht_dec2dec_bte
comment "cast decimal(sht) to decimal(bte) and check for overflow";

command calc.bte(v:int, digits:int, scale:int) :bte
address int_num2dec_bte
comment "cast number to decimal(bte) and check for overflow";

command batcalc.bte(v:bat[:int], digits:int, scale:int) :bat[:bte]
address batint_num2dec_bte
comment "cast number to decimal(bte) and check for overflow";

command calc.bte(s1:int, v:int) :bte
address int_dec2_bte
comment "cast decimal(int) to bte and check for overflow";
command calc.bte(s1:int, v:int, d2:int, s2:int) :bte
address int_dec2dec_bte
comment "cast decimal(int) to decimal(bte) and check for overflow";

command batcalc.bte(s1:int, v:bat[:int]) :bat[:bte]
address batint_dec2_bte
comment "cast decimal(int) to bte and check for overflow";
command batcalc.bte(s1:int, v:bat[:int], d2:int, s2:int) :bat[:bte]
address batint_dec2dec_bte
comment "cast decimal(int) to decimal(bte) and check for overflow";

command calc.bte( v:lng, digits:int, scale:int ) :bte
address lng_num2dec_bte
comment "cast number to decimal(bte) and check for overflow";

command batcalc.bte(v:bat[:lng], digits:int, scale:int) :bat[:bte]
address batlng_num2dec_bte
comment "cast number to decimal(bte) and check for overflow";

command calc.bte(s1:int, v:lng) :bte
address lng_dec2_bte
comment "cast decimal(lng) to bte and check for overflow";
command calc.bte(s1:int, v:lng, d2:int, s2:int) :bte
address lng_dec2dec_bte
comment "cast decimal(lng) to decimal(bte) and check for overflow";

command batcalc.bte(s1:int, v:bat[:lng]) :bat[:bte]
address batlng_dec2_bte
comment "cast decimal(lng) to bte and check for overflow";
command batcalc.bte(s1:int, v:bat[:lng], d2:int, s2:int) :bat[:bte]
address batlng_dec2dec_bte
comment "cast decimal(lng) to decimal(bte) and check for overflow";

command calc.sht(v:bte, digits:int, scale:int) :sht
address bte_num2dec_sht
comment "cast number to decimal(sht) and check for overflow";

command batcalc.sht(v:bat[:bte], digits:int, scale:int) :bat[:sht]
address batbte_num2dec_sht
comment "cast number to decimal(sht) and check for overflow";

command calc.sht(s1:int, v:bte) :sht
address bte_dec2_sht
comment "cast decimal(bte) to sht and check for overflow";
command calc.sht(s1:int, v:bte, d2:int, s2:int) :sht
address bte_dec2dec_sht
comment "cast decimal(bte) to decimal(sht) and check for overflow";

command batcalc.sht(s1:int, v:bat[:bte]) :bat[:sht]
address batbte_dec2_sht
comment "cast decimal(bte) to sht and check for overflow";
command batcalc.sht(s1:int, v:bat[:bte], d2:int, s2:int) :bat[:sht]
address batbte_dec2dec_sht
comment "cast decimal(bte) to decimal(sht) and check for overflow";

command calc.sht(v:sht, digits:int, scale:int) :sht
address sht_num2dec_sht
comment "cast number to decimal(sht) and check for overflow";

command batcalc.sht(v:bat[:sht], digits:int, scale:int) :bat[:sht]
address batsht_num2dec_sht
comment "cast number to decimal(sht) and check for overflow";

command calc.sht(s1:int, v:sht) :sht
address sht_dec2_sht
comment "cast decimal(sht) to sht and check for overflow";
command calc.sht(s1:int, v:sht, d2:int, s2:int) :sht
address sht_dec2dec_sht
comment "cast decimal(sht) to decimal(sht) and check for overflow";

command batcalc.sht(s1:int, v:bat[:sht]) :bat[:sht]
address batsht_dec2_sht
comment "cast decimal(sht) to sht and check for overflow";
command batcalc.sht(s1:int, v:bat[:sht], d2:int, s2:int) :bat[:sht]
address batsht_dec2dec_sht
comment "cast decimal(sht) to decimal(sht) and check for overflow";

command calc.sht(v:int, digits:int, scale:int) :sht
address int_num2dec_sht
comment "cast number to decimal(sht) and check for overflow";

command batcalc.sht(v:bat[:int], digits:int, scale:int) :bat[:sht]
address batint_num2dec_sht
comment "cast number to decimal(sht) and check for overflow";

command calc.sht(s1:int, v:int) :sht
address int_dec2_sht
comment "cast decimal(int) to sht and check for overflow";
command calc.sht(s1:int, v:int, d2:int, s2:int) :sht
address int_dec2dec_sht
comment "cast decimal(int) to decimal(sht) and check for overflow";

command batcalc.sht(s1:int, v:bat[:int]) :bat[:sht]
address batint_dec2_sht
comment "cast decimal(int) to sht and check for overflow";
command batcalc.sht(s1:int, v:bat[:int], d2:int, s2:int) :bat[:sht]
address batint_dec2dec_sht
comment "cast decimal(int) to decimal(sht) and check for overflow";

command calc.sht( v:lng, digits:int, scale:int ) :sht
address lng_num2dec_sht
comment "cast number to decimal(sht) and check for overflow";

command batcalc.sht(v:bat[:lng], digits:int, scale:int) :bat[:sht]
address batlng_num2dec_sht
comment "cast number to decimal(sht) and check for overflow";

command calc.sht(s1:int, v:lng) :sht
address lng_dec2_sht
comment "cast decimal(lng) to sht and check for overflow";
command calc.sht(s1:int, v:lng, d2:int, s2:int) :sht
address lng_dec2dec_sht
comment "cast decimal(lng) to decimal(sht) and check for overflow";

command batcalc.sht(s1:int, v:bat[:lng]) :bat[:sht]
address batlng_dec2_sht
comment "cast decimal(lng) to sht and check for overflow";
command batcalc.sht(s1:int, v:bat[:lng], d2:int, s2:int) :bat[:sht]
address batlng_dec2dec_sht
comment "cast decimal(lng) to decimal(sht) and check for overflow";

command calc.int(v:bte, digits:int, scale:int) :int
address bte_num2dec_int
comment "cast number to decimal(int) and check for overflow";

command batcalc.int(v:bat[:bte], digits:int, scale:int) :bat[:int]
address batbte_num2dec_int
comment "cast number to decimal(int) and check for overflow";

command calc.int(s1:int, v:bte) :int
address bte_dec2_int
comment "cast decimal(bte) to int and check for overflow";
command calc.int(s1:int, v:bte, d2:int, s2:int) :int
address bte_dec2dec_int
comment "cast decimal(bte) to decimal(int) and check for overflow";

command batcalc.int(s1:int, v:bat[:bte]) :bat[:int]
address batbte_dec2_int
comment "cast decimal(bte) to int and check for overflow";
command batcalc.int(s1:int, v:bat[:bte], d2:int, s2:int) :bat[:int]
address batbte_dec2dec_int
comment "cast decimal(bte) to decimal(int) and check for overflow";

command calc.int(v:sht, digits:int, scale:int) :int
address sht_num2dec_int
comment "cast number to decimal(int) and check for overflow";

command batcalc.int(v:bat[:sht], digits:int, scale:int) :bat[:int]
address batsht_num2dec_int
comment "cast number to decimal(int) and check for overflow";

command calc.int(s1:int, v:sht) :int
address sht_dec2_int
comment "cast decimal(sht) to int and check for overflow";
command calc.int(s1:int, v:sht, d2:int, s2:int) :int
address sht_dec2dec_int
comment "cast decimal(sht) to decimal(int) and check for overflow";

command batcalc.int(s1:int, v:bat[:sht]) :bat[:int]
address batsht_dec2_int
comment "cast decimal(sht) to int and check for overflow";
command batcalc.int(s1:int, v:bat[:sht], d2:int, s2:int) :bat[:int]
address batsht_dec2dec_int
comment "cast decimal(sht) to decimal(int) and check for overflow";

command calc.int(v:int, digits:int, scale:int) :int
address int_num2dec_int
comment "cast number to decimal(int) and check for overflow";

command batcalc.int(v:bat[:int], digits:int, scale:int) :bat[:int]
address batint_num2dec_int
comment "cast number to decimal(int) and check for overflow";

command calc.int(s1:int, v:int) :int
address int_dec2_int
comment "cast decimal(int) to int and check for overflow";
command calc.int(s1:int, v:int, d2:int, s2:int) :int
address int_dec2dec_int
comment "cast decimal(int) to decimal(int) and check for overflow";

command batcalc.int(s1:int, v:bat[:int]) :bat[:int]
address batint_dec2_int
comment "cast decimal(int) to int and check for overflow";
command batcalc.int(s1:int, v:bat[:int], d2:int, s2:int) :bat[:int]
address batint_dec2dec_int
comment "cast decimal(int) to decimal(int) and check for overflow";

command calc.int( v:lng, digits:int, scale:int ) :int
address lng_num2dec_int
comment "cast number to decimal(int) and check for overflow";

command batcalc.int(v:bat[:lng], digits:int, scale:int) :bat[:int]
address batlng_num2dec_int
comment "cast number to decimal(int) and check for overflow";

command calc.int(s1:int, v:lng) :int
address lng_dec2_int
comment "cast decimal(lng) to int and check for overflow";
command calc.int(s1:int, v:lng, d2:int, s2:int) :int
address lng_dec2dec_int
comment "cast decimal(lng) to decimal(int) and check for overflow";

command batcalc.int(s1:int, v:bat[:lng]) :bat[:int]
address batlng_dec2_int
comment "cast decimal(lng) to int and check for overflow";
command batcalc.int(s1:int, v:bat[:lng], d2:int, s2:int) :bat[:int]
address batlng_dec2dec_int
comment "cast decimal(lng) to decimal(int) and check for overflow";

command calc.lng( v:bte, digits:int, scale:int ) :lng
address bte_num2dec_lng
comment "cast number to decimal(lng) and check for overflow";

command batcalc.lng(v:bat[:bte], digits:int, scale:int) :bat[:lng]
address batbte_num2dec_lng
comment "cast number to decimal(lng) and check for overflow";

command calc.lng(s1:int, v:bte) :lng
address bte_dec2_lng
comment "cast decimal(bte) to lng and check for overflow";
command calc.lng(s1:int, v:bte, d2:int, s2:int) :lng
address bte_dec2dec_lng
comment "cast decimal(bte) to decimal(lng) and check for overflow";

command batcalc.lng(s1:int, v:bat[:bte]) :bat[:lng]
address batbte_dec2_lng
comment "cast decimal(bte) to lng and check for overflow";
command batcalc.lng(s1:int, v:bat[:bte], d2:int, s2:int) :bat[:lng]
address batbte_dec2dec_lng
comment "cast decimal(bte) to decimal(lng) and check for overflow";

command calc.lng(v:sht, digits:int, scale:int) :lng
address sht_num2dec_lng
comment "cast number to decimal(lng) and check for overflow";

command batcalc.lng(v:bat[:sht], digits:int, scale:int) :bat[:lng]
address batsht_num2dec_lng
comment "cast number to decimal(lng) and check for overflow";

command calc.lng(s1:int, v:sht) :lng
address sht_dec2_lng
comment "cast decimal(sht) to lng and check for overflow";
command calc.lng(s1:int, v:sht, d2:int, s2:int) :lng
address sht_dec2dec_lng
comment "cast decimal(sht) to decimal(lng) and check for overflow";

command batcalc.lng(s1:int, v:bat[:sht]) :bat[:lng]
address batsht_dec2_lng
comment "cast decimal(sht) to lng and check for overflow";
command batcalc.lng(s1:int, v:bat[:sht], d2:int, s2:int) :bat[:lng]
address batsht_dec2dec_lng
comment "cast decimal(sht) to decimal(lng) and check for overflow";

command calc.lng(v:int, digits:int, scale:int) :lng
address int_num2dec_lng
comment "cast number to decimal(lng) and check for overflow";

command batcalc.lng(v:bat[:int], digits:int, scale:int) :bat[:lng]
address batint_num2dec_lng
comment "cast number to decimal(lng) and check for overflow";

command calc.lng(s1:int, v:int) :lng
address int_dec2_lng
comment "cast decimal(int) to lng and check for overflow";
command calc.lng(s1:int, v:int, d2:int, s2:int) :lng
address int_dec2dec_lng
comment "cast decimal(int) to decimal(lng) and check for overflow";

command batcalc.lng(s1:int, v:bat[:int]) :bat[:lng]
address batint_dec2_lng
comment "cast decimal(int) to lng and check for overflow";
command batcalc.lng(s1:int, v:bat[:int], d2:int, s2:int) :bat[:lng]
address batint_dec2dec_lng
comment "cast decimal(int) to decimal(lng) and check for overflow";

command calc.lng( v:lng, digits:int, scale:int ) :lng
address lng_num2dec_lng
comment "cast number to decimal(lng) and check for overflow";

command batcalc.lng(v:bat[:lng], digits:int, scale:int) :bat[:lng]
address batlng_num2dec_lng
comment "cast number to decimal(lng) and check for overflow";

command calc.lng(s1:int, v:lng) :lng
address lng_dec2_lng
comment "cast decimal(lng) to lng and check for overflow";
command calc.lng(s1:int, v:lng, d2:int, s2:int) :lng
address lng_dec2dec_lng
comment "cast decimal(lng) to decimal(lng) and check for overflow";

command batcalc.lng(s1:int, v:bat[:lng]) :bat[:lng]
address batlng_dec2_lng
comment "cast decimal(lng) to lng and check for overflow";
command batcalc.lng(s1:int, v:bat[:lng], d2:int, s2:int) :bat[:lng]
address batlng_dec2dec_lng
comment "cast decimal(lng) to decimal(lng) and check for overflow";

command calc.flt(v:bte, digits:int, scale:int) :flt
address bte_num2dec_flt
comment "cast number to decimal(flt) and check for overflow";

command batcalc.flt(v:bat[:bte], digits:int, scale:int) :bat[:flt]
address batbte_num2dec_flt
comment "cast number to decimal(flt) and check for overflow";

command calc.flt(s1:int, v:bte) :flt
address bte_dec2_flt
comment "cast decimal(bte) to flt and check for overflow";
command calc.flt(s1:int, v:bte, d2:int, s2:int) :flt
address bte_dec2dec_flt
comment "cast decimal(bte) to decimal(flt) and check for overflow";

command batcalc.flt(s1:int, v:bat[:bte]) :bat[:flt]
address batbte_dec2_flt
comment "cast decimal(bte) to flt and check for overflow";
command batcalc.flt(s1:int, v:bat[:bte], d2:int, s2:int) :bat[:flt]
address batbte_dec2dec_flt
comment "cast decimal(bte) to decimal(flt) and check for overflow";

command calc.flt(v:sht, digits:int, scale:int) :flt
address sht_num2dec_flt
comment "cast number to decimal(flt) and check for overflow";

command batcalc.flt(v:bat[:sht], digits:int, scale:int) :bat[:flt]
address batsht_num2dec_flt
comment "cast number to decimal(flt) and check for overflow";

command calc.flt(s1:int, v:sht) :flt
address sht_dec2_flt
comment "cast decimal(sht) to flt and check for overflow";
command calc.flt(s1:int, v:sht, d2:int, s2:int) :flt
address sht_dec2dec_flt
comment "cast decimal(sht) to decimal(flt) and check for overflow";

command batcalc.flt(s1:int, v:bat[:sht]) :bat[:flt]
address batsht_dec2_flt
comment "cast decimal(sht) to flt and check for overflow";
command batcalc.flt(s1:int, v:bat[:sht], d2:int, s2:int) :bat[:flt]
address batsht_dec2dec_flt
comment "cast decimal(sht) to decimal(flt) and check for overflow";

command calc.flt(v:int, digits:int, scale:int) :flt
address int_num2dec_flt
comment "cast number to decimal(flt) and check for overflow";

command batcalc.flt(v:bat[:int], digits:int, scale:int) :bat[:flt]
address batint_num2dec_flt
comment "cast number to decimal(flt) and check for overflow";

command calc.flt(s1:int, v:int) :flt
address int_dec2_flt
comment "cast decimal(int) to flt and check for overflow";
command calc.flt(s1:int, v:int, d2:int, s2:int) :flt
address int_dec2dec_flt
comment "cast decimal(int) to decimal(flt) and check for overflow";

command batcalc.flt(s1:int, v:bat[:int]) :bat[:flt]
address batint_dec2_flt
comment "cast decimal(int) to flt and check for overflow";
command batcalc.flt(s1:int, v:bat[:int], d2:int, s2:int) :bat[:flt]
address batint_dec2dec_flt
comment "cast decimal(int) to decimal(flt) and check for overflow";

command calc.flt( v:lng, digits:int, scale:int ) :flt
address lng_num2dec_flt
comment "cast number to decimal(flt) and check for overflow";

command batcalc.flt(v:bat[:lng], digits:int, scale:int) :bat[:flt]
address batlng_num2dec_flt
comment "cast number to decimal(flt) and check for overflow";

command calc.flt(s1:int, v:lng) :flt
address lng_dec2_flt
comment "cast decimal(lng) to flt and check for overflow";
command calc.flt(s1:int, v:lng, d2:int, s2:int) :flt
address lng_dec2dec_flt
comment "cast decimal(lng) to decimal(flt) and check for overflow";

command batcalc.flt(s1:int, v:bat[:lng]) :bat[:flt]
address batlng_dec2_flt
comment "cast decimal(lng) to flt and check for overflow";
command batcalc.flt(s1:int, v:bat[:lng], d2:int, s2:int) :bat[:flt]
address batlng_dec2dec_flt
comment "cast decimal(lng) to decimal(flt) and check for overflow";

command calc.dbl(v:bte, digits:int, scale:int) :dbl
address bte_num2dec_dbl
comment "cast number to decimal(dbl) and check for overflow";

command batcalc.dbl(v:bat[:bte], digits:int, scale:int) :bat[:dbl]
address batbte_num2dec_dbl
comment "cast number to decimal(dbl) and check for overflow";

command calc.dbl(s1:int, v:bte) :dbl
address bte_dec2_dbl
comment "cast decimal(bte) to dbl and check for overflow";
command calc.dbl(s1:int, v:bte, d2:int, s2:int) :dbl
address bte_dec2dec_dbl
comment "cast decimal(bte) to decimal(dbl) and check for overflow";

command batcalc.dbl(s1:int, v:bat[:bte]) :bat[:dbl]
address batbte_dec2_dbl
comment "cast decimal(bte) to dbl and check for overflow";
command batcalc.dbl(s1:int, v:bat[:bte], d2:int, s2:int) :bat[:dbl]
address batbte_dec2dec_dbl
comment "cast decimal(bte) to decimal(dbl) and check for overflow";

command calc.dbl(v:sht, digits:int, scale:int) :dbl
address sht_num2dec_dbl
comment "cast number to decimal(dbl) and check for overflow";

command batcalc.dbl(v:bat[:sht], digits:int, scale:int) :bat[:dbl]
address batsht_num2dec_dbl
comment "cast number to decimal(dbl) and check for overflow";

command calc.dbl(s1:int, v:sht) :dbl
address sht_dec2_dbl
comment "cast decimal(sht) to dbl and check for overflow";
command calc.dbl(s1:int, v:sht, d2:int, s2:int) :dbl
address sht_dec2dec_dbl
comment "cast decimal(sht) to decimal(dbl) and check for overflow";

command batcalc.dbl(s1:int, v:bat[:sht]) :bat[:dbl]
address batsht_dec2_dbl
comment "cast decimal(sht) to dbl and check for overflow";
command batcalc.dbl(s1:int, v:bat[:sht], d2:int, s2:int) :bat[:dbl]
address batsht_dec2dec_dbl
comment "cast decimal(sht) to decimal(dbl) and check for overflow";

command calc.dbl(v:int, digits:int, scale:int) :dbl
address int_num2dec_dbl
comment "cast number to decimal(dbl) and check for overflow";

command batcalc.dbl(v:bat[:int], digits:int, scale:int) :bat[:dbl]
address batint_num2dec_dbl
comment "cast number to decimal(dbl) and check for overflow";

command calc.dbl(s1:int, v:int) :dbl
address int_dec2_dbl
comment "cast decimal(int) to dbl and check for overflow";
command calc.dbl(s1:int, v:int, d2:int, s2:int) :dbl
address int_dec2dec_dbl
comment "cast decimal(int) to decimal(dbl) and check for overflow";

command batcalc.dbl(s1:int, v:bat[:int]) :bat[:dbl]
address batint_dec2_dbl
comment "cast decimal(int) to dbl and check for overflow";
command batcalc.dbl(s1:int, v:bat[:int], d2:int, s2:int) :bat[:dbl]
address batint_dec2dec_dbl
comment "cast decimal(int) to decimal(dbl) and check for overflow";

command calc.dbl( v:lng, digits:int, scale:int ) :dbl
address lng_num2dec_dbl
comment "cast number to decimal(dbl) and check for overflow";

command batcalc.dbl(v:bat[:lng], digits:int, scale:int) :bat[:dbl]
address batlng_num2dec_dbl
comment "cast number to decimal(dbl) and check for overflow";

command calc.dbl(s1:int, v:lng) :dbl
address lng_dec2_dbl
comment "cast decimal(lng) to dbl and check for overflow";
command calc.dbl(s1:int, v:lng, d2:int, s2:int) :dbl
address lng_dec2dec_dbl
comment "cast decimal(lng) to decimal(dbl) and check for overflow";

command batcalc.dbl(s1:int, v:bat[:lng]) :bat[:dbl]
address batlng_dec2_dbl
comment "cast decimal(lng) to dbl and check for overflow";
command batcalc.dbl(s1:int, v:bat[:lng], d2:int, s2:int) :bat[:dbl]
address batlng_dec2dec_dbl
comment "cast decimal(lng) to decimal(dbl) and check for overflow";

