Hello,

I was wondering if anyone could let me know how I can have allegro common lisp recognize the mathematical symbol 'e' as the mathematical e and not a letter or something

thank you

3 posts
• Page **1** of **1**

Hello,

I was wondering if anyone could let me know how I can have allegro common lisp recognize the mathematical symbol 'e' as the mathematical e and not a letter or something

thank you

I was wondering if anyone could let me know how I can have allegro common lisp recognize the mathematical symbol 'e' as the mathematical e and not a letter or something

thank you

- gayelle
**Posts:**9**Joined:**Mon Oct 03, 2011 8:34 pm

I don't know if there's an Allegro-specific extension that defines e as Euler's number, but e is no predefined constant of the Common Lisp standard.

Here's how you can make your own e constant:

HTH - edgar

Here's how you can make your own e constant:

- Code: Select all
`CL-USER> (defconstant e (exp 1))`

E

CL-USER> e

2.7182817

HTH - edgar

- edgar-rft
**Posts:**161**Joined:**Fri Aug 06, 2010 6:34 am**Location:**Germany

I have this question to answer for a quiz and im at an impass. At first i couldnt figure out the E but now I cant figure out how to use a condition... This was the question:

4. Use cond and exp to define (activation type sum) which returns the activation value of a connectionist unit given a sum of products of input activations x corresponding connection weights. Include both ‘sigmoid and ‘asigmoid types of activation functions, and return ‘unknown-type if some other type is used as input.

I defined two functions for the asigmoid and sigmoid functions but have no idea how to put them together in an activation sum function

4. Use cond and exp to define (activation type sum) which returns the activation value of a connectionist unit given a sum of products of input activations x corresponding connection weights. Include both ‘sigmoid and ‘asigmoid types of activation functions, and return ‘unknown-type if some other type is used as input.

I defined two functions for the asigmoid and sigmoid functions but have no idea how to put them together in an activation sum function

- Code: Select all
`(defun sigmoid (x)`

(- 0.5 (/ 1 (- 1 (exp x)))))

(defun asigmoid (x)

(/ 1 (- 1 (exp x))))

- gayelle
**Posts:**9**Joined:**Mon Oct 03, 2011 8:34 pm

3 posts
• Page **1** of **1**

Users browsing this forum: No registered users and 2 guests