1// Copyright 2017 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// +build go1.12
6
7package rand
8
9import "math/bits"
10
11func (pcg *PCGSource) add() {
12	var carry uint64
13	pcg.low, carry = bits.Add64(pcg.low, incLow, 0)
14	pcg.high, _ = bits.Add64(pcg.high, incHigh, carry)
15}
16
17func (pcg *PCGSource) multiply() {
18	hi, lo := bits.Mul64(pcg.low, mulLow)
19	hi += pcg.high * mulLow
20	hi += pcg.low * mulHigh
21	pcg.low = lo
22	pcg.high = hi
23}
24