(bind-func toString
"specialised toString function for Complexd"
(lambda (c:Complexd*)
(let ((str:i8* (salloc 256)))
(if (null? c)
(sprintf str "<Complexd 0x0>")
(sprintf str "%.2f%+.2fi"
(tref c 0)
(tref c 1)))
(Str str))))