Note that bulge /= angle, and therefore this will yield unexpected results as the cursor moves around the vertices.
Instead, you might consider calculating the bulge in the following way, exploiting the inscribed angle theorem:
(defun c:test ( / a1 ex gr p1 p2 zv )
(setq zv (trans '(0 0 1) 1 0 t))
(if (setq p1 (getpoint "\nSpecify first point: "))
(progn
(while (setq p2 (getpoint p1 "\nSpecify next point: "))
(setq ex
(entget
(entmakex
(list
'(000 . "LWPOLYLINE")
'(100 . "AcDbEntity")
'(100 . "AcDbPolyline")
'(090 . 2)
'(070 . 0)
(cons 010 (trans p1 1 zv))
(cons 010 (trans p2 1 zv))
(cons 210 zv)
)
)
)
)
(while (= 5 (car (setq gr (grread t 13 0))))
(setq a1 (/ (- (angle (cadr gr) p2) (angle p1 (cadr gr))) 2))
(entmod (subst (cons 42 (/ (sin a1) (cos a1))) (assoc 42 ex) ex))
)
(setq p1 p2)
)
)
)
(princ)
)