accumpos
Add twofi
objects or values
Syntax
c = accumpos(a,b)
c = accumpos(a,b,RoundingMethod)
c = accumpos(a,b,RoundingMethod,OverflowAction)
Description
addsc
= accumpos(a
,b
)a
andb
using thea
’s data type.b
is cast intoa
’s data type. Ifa
is afi
object, the default'Floor'
rounding method and default'Wrap'
overflow action are used. The fimath properties ofa
andb
are ignored.
uses the rounding method specified inc
= accumpos(a
,b
,RoundingMethod)RoundingMethod
.
uses the overflow action specified inc
= accumpos(a
,b
,RoundingMethod,OverflowAction)OverflowAction
.
Input Arguments
|
Number to add. |
|
Number to add. |
|
Rounding method to use if Default: |
|
如果溢出行动 Default: |
Examples
Add twofi
numbers using defaultaccumpos
settings and then, using nondefault rounding method and overflow action.
a = fi(pi,1,16,13); b = fi(1.5,1,16,14); add_default = accumpos(a,b); add_custom = accumpos(a,b,'Nearest','Saturate');