Function: math-compose-sqrt
math-compose-sqrt is a byte-compiled function defined in
calccomp.el.gz.
Signature
(math-compose-sqrt A PREC)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calccomp.el.gz
(defun math-compose-sqrt (a _prec)
(when (= (length a) 2)
(let* ((c (math-compose-expr (nth 1 a) 0))
(a (math-comp-ascent c))
(d (math-comp-descent c))
(h (+ a d))
(w (math-comp-width c)))
(list 'vleft
a
(concat (if (= h 1) " " " ")
(make-string (+ w 2) ?\_))
(list 'horiz
(if (= h 1)
(if (char-displayable-p ?√)
"√" "V")
(append (list 'vleft (1- a))
(make-list (1- h) " |")
'("\\|")))
" "
c)))))