G
G
GooGreyGreen2020-04-19 21:38:47
Lisp
GooGreyGreen, 2020-04-19 21:38:47

Why doesn't construction work in common lisp?

Good time of the day. I'm new to common lisp and I don't quite understand why this construction doesn't work, I try to make XoR for it, the activator
works in parts, including (exp -1) (exp 1), etc.
I work through emacs slime
Although the same clisp is the same in the console history so I thought the problem is in the syntax
(defun sigmoid (x)
(/ 1 (+ 1 (exp -x))))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TriKrista, 2020-04-19
@GooGreyGreen

and if so?

(defun sigmoid (x)
  (/ 1 (+ 1 (exp (- x)))))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question