示例#1
0
// Max returns the larger of a and b.
// If either a or b is NaN then the other argument is the result.
//
func (context *Context) Max(a Quad, b Quad) (r Quad) {
	var result C.Ret_decQuad_t
	assert_sane(context)

	result = C.mdq_max(a.val, b.val, context.set)

	context.set = result.set
	return Quad{val: result.val}
}
示例#2
0
文件: mydecquad.go 项目: rin01/decnum
// Max returns the larger of a and b.
// If either a or b is NaN then the other argument is the result.
//
func Max(a Quad, b Quad) Quad {

	return Quad(C.mdq_max(C.struct_Quad(a), C.struct_Quad(b)))
}