summaryrefslogtreecommitdiffstats
path: root/vendor/modernc.org/mathutil/sqr.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/modernc.org/mathutil/sqr.go')
-rw-r--r--vendor/modernc.org/mathutil/sqr.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/modernc.org/mathutil/sqr.go b/vendor/modernc.org/mathutil/sqr.go
new file mode 100644
index 00000000..0b29b874
--- /dev/null
+++ b/vendor/modernc.org/mathutil/sqr.go
@@ -0,0 +1,11 @@
+// +build !riscv64
+
+package mathutil
+
+import "github.com/remyoudompheng/bigfft"
+
+func (f *float) sqr() {
+ f.n = bigfft.Mul(f.n, f.n)
+ f.fracBits *= 2
+ f.normalize()
+}