Esempio n. 1
0
// FromInt64 returns a Quad from a int64 value.
//
// No error should occur, and context status will not change.
//
func (context *Context) FromInt64(value int64) (r Quad) {
	var result C.Ret_decQuad_t
	assert_sane(context)

	result = C.mdq_from_int64(C.int64_t(value), context.set)

	context.set = result.set
	return Quad{val: result.val}
}
Esempio n. 2
0
// FromInt64 returns a Quad from a int64 value.
//
// No error occurs.
//
// Note that FromInt64 is slower than FromInt32, because the underlying C decNumber package has no function that converts directly from int64.
// So, int64 is first converted to string, and then to Quad.
//
func FromInt64(value int64) Quad {

	return Quad(C.mdq_from_int64(C.int64_t(value)))
}