<< max DD: 16 bytes decimal arithmetics norm >>

DD_QD (MuPAT) >> DD_QD (MuPAT) > DD: 16 bytes decimal arithmetics > min

min

minimal value of an array of DD numbers

Syntax

dd = min(DD)
DDrow = min(DD, "r"|1)
DDcol = min(DD, "c"|2)
[v, k] = min(DD..)

Parameters

DD

array of DD-encoded real numbers

dd

DD-encoded number.

DDrow

row of DD-encoded numbers.

DDcol

column of DD-encoded numbers.

v

One of the results dd, DDrow, DDcol, according to the used syntax.

k

vector: linearized index, indices of rows, or indices of columns in DD where the (first) minimum is found. Has the shape of v.

Description

v = min(DD), [v, k] = min(DD), and its input directional option v = min(DD,'r'|1|'c'|2) and [v, k] = min(DD,'r'|1|'c'|2) work for DD arrays as for usual decimal numbers. Please refer to the examples below and to the min() page to see details. "r" and 1 option values are equivalent ; "c" and 2 ones as well.

Please note that the syntax min(DD1,DD2,..) is not supported.

Examples

hi = grand(3,4,"uin",-2,2); lo = grand(3,4,"uin",0,9).*sign(hi);
d = dd(hi, lo*1e-18)

[v, k] = min(d)
[v, k] = min(d, "r")
[v, k] = min(d, "c")
--> hi = grand(3,4,"uin",-2,2); lo = grand(3,4,"uin",0,9).*sign(hi);
--> d = dd(hi, lo*1e-18)
 d  = 
[d1]
   0.   1.   0.   0.
   0.  -2.  -1.   2.
   1.  -1.  -1.  -1.

[d2] 10^-17 *
   0.    0.8   0.    0. 
   0.   -0.2  -0.2   0.5
   0.6   0.   -0.1  -0.2

--> [v, k] = min(d)
 k  = 
   5.
 v  = 
  -2.000000000000000002000000000000E0


--> [v, k] = min(d, "r")
 k  = 
   1.   2.   2.   3.

 v  = 
[d1]
   0.  -2.  -1.  -1.

[d2] 10^-17 *
   0.  -0.2  -0.2  -0.2

--> [v, k] = min(d, "c")
 k  = 
   1.
   2.
   4.

 v  = 
[d1]
   0.
  -2.
  -1.

[d2] 10^-17 *
   0.
  -0.2
  -0.2

See Also

Authors

Copyright (C) 2018 - Samuel GOUGEON

Report an issue
<< max DD: 16 bytes decimal arithmetics norm >>