about summary refs log tree commit diff
path: root/vendor/modernc.org/mathutil/sqr.go
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-08-16 19:50:26 +0200
committerEmile <git@emile.space>2024-08-16 19:50:26 +0200
commit1a57267a17c2fc17fb6e104846fabc3e363c326c (patch)
tree1e574e3a80622086dc3c81ff9cba65ef7049b1a9 /vendor/modernc.org/mathutil/sqr.go
initial commit
Diffstat (limited to 'vendor/modernc.org/mathutil/sqr.go')
-rw-r--r--vendor/modernc.org/mathutil/sqr.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/modernc.org/mathutil/sqr.go b/vendor/modernc.org/mathutil/sqr.go
new file mode 100644
index 0000000..b7e15c9
--- /dev/null
+++ b/vendor/modernc.org/mathutil/sqr.go
@@ -0,0 +1,12 @@
+//go:build !riscv64 && !loong64
+// +build !riscv64,!loong64
+
+package mathutil
+
+import "github.com/remyoudompheng/bigfft"
+
+func (f *float) sqr() {
+	f.n = bigfft.Mul(f.n, f.n)
+	f.fracBits *= 2
+	f.normalize()
+}