Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1103747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:23:04+00:00 2026-05-17T01:23:04+00:00

I am looking for a way to implement a fast logistic function. The classic

  • 0

I am looking for a way to implement a fast logistic function. The classic definition of logistic function is:

y(x) = 1 / (1 + (1/e^x)) where ^ is exponentiation.

or equally: y(x) = (e^x) / (e^x + 1)

However, my special logistic function has a base E instead of e, so:

y(x) = E^x / (E^x + 1)

E and x in my case are 32-bit integer, fixed point in base 2 of 16.16 type. E is so near as possible to the real constant e.

What is the fastest algorithm for such function ? I would prefer no lookup tables. Something like bit-manipulations should be perfect.


UPDATE:

Intuitively, I feel that there exists a very fast and simple method, based on Euler’s formula:

e^(i*x) = cos(x) + i*sin(x)

where i is the imaginary unit.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:23:04+00:00Added an answer on May 17, 2026 at 1:23 am

    Powers do not easily convert to bit shifts, because

    E^x = 2^log2(E^x) = 2^(x*log2(E))
    

    and this will give you a fractional number of bits to shift. You could calculate x*log2(E) and then decompose the power into a sum of separate bit shifts, but this is unlikely be as fast as a lookup table followed by a couple of iterations of Newton’s method. Then again, this depends on how expensive your fixed-point arithmetic operations are.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a way to implement a custom enterKey event for jQuery: $('selector').enterKey(function(){
I'm looking for a way to implement Foursquare's style of leaderboard where instead of
I'm looking for a way to implement drag and drop with multi touch in
Looking for some advice on the best way to implement localization along with client
I'm looking for a good way to implement a truly modal dialog in Silverlight
I'm looking for ideas on how to implement a way to get web based
I'm looking for a way to implement RPC between Java and C. What are
I'm looking for a way to implement a bidirectional RPC in node.js (means that
I was recently looking for a way to implement a doubly buffered thread-safe cache
Still the newbie in Scala and I'm now looking for a way to implement

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.