Пример #1
0
// Remainder returns the modulo of a and b.
//
func (context *Context) Remainder(a Quad, b Quad) (r Quad) {
	var result C.Ret_decQuad_t
	assert_sane(context)

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

	context.set = result.set
	return Quad{val: result.val}
}
Пример #2
0
// Mod returns the modulo of a and b.
//
func (a Quad) Mod(b Quad) Quad {

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