gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rw-r--r--matrix.lua 6
1 files changed, 6 insertions, 0 deletions
diff --git a/matrix.lua b/matrix.lua
index 9c8e6215..75e1d19b 100644
--- a/matrix.lua
+++ b/matrix.lua
@@ -538,6 +538,12 @@ local complex_mt = {
__mul = generic_mul,
__div = generic_div,
+ __eq = function(a, b)
+ local ar, ai = cartesian(a)
+ local br, bi = cartesian(b)
+ return (ar == br) and (ai == bi)
+ end,
+
__pow = function(z,n)
if is_real(n) then
return gsl.gsl_complex_pow_real (z, n)
generated by cgit v1.2.3 (git 2.39.1) at 2025年10月02日 14:05:10 +0000

AltStyle によって変換されたページ (->オリジナル) /