English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 03 December 2006, 16:09   #1
Zetr0
Ya' like it Retr0?
 
Zetr0's Avatar
 
Join Date: Jul 2005
Location: United Kingdom
Age: 49
Posts: 9,768
Discretizing / Normalizing Values in C/C++

heys guys,

I am having trouble relating math to code, I can write it on paper, I can understand it but tring to get it into code is... well escaping my sore little brain...



I just need this in C source and well google is being a biggot!!
Zetr0 is offline  
Old 03 December 2006, 16:16   #2
musashi5150
move.w #$4489,$dff07e
 
musashi5150's Avatar
 
Join Date: Sep 2005
Location: Norfolk, UK
Age: 42
Posts: 2,351
Code:
#include <math.h>
 
double result = 1 / ( 1 + exp(-1*y) );
How's that ?

http://www.cppreference.com/stdmath/exp.html explains the exp function - I use this site as an online C/C++ reference.
musashi5150 is offline  
Old 03 December 2006, 16:17   #3
Zetr0
Ya' like it Retr0?
 
Zetr0's Avatar
 
Join Date: Jul 2005
Location: United Kingdom
Age: 49
Posts: 9,768
Sweeet!!!!!!!!
Zetr0 is offline  
Old 04 December 2006, 03:38   #4
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,652
hmm why not 1 / ( 1 + exp(-y) ); ?
Photon is offline  
Old 04 December 2006, 09:29   #5
musashi5150
move.w #$4489,$dff07e
 
musashi5150's Avatar
 
Join Date: Sep 2005
Location: Norfolk, UK
Age: 42
Posts: 2,351
Quote:
Originally Posted by Photon
hmm why not 1 / ( 1 + exp(-y) ); ?
That'd be fine too
musashi5150 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need SMD resistor values (A1200 1D1) 8bitbubsy support.Hardware 1 13 December 2010 08:35
The AMIGA Market value and your collection values Gordon Amiga scene 12 11 September 2009 17:25
Rare games & their values Tommy K MarketPlace 13 15 April 2005 16:25

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:29.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07938 seconds with 13 queries