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 124231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T04:24:46+00:00 2026-05-11T04:24:46+00:00

I currently have an application which can contain 100s of user defined formulae. Currently,

  • 0

I currently have an application which can contain 100s of user defined formulae. Currently, I use reverse polish notation to perform the calculations (pushing values and variables on to a stack, then popping them off the stack and evaluating). What would be the best way to start parallelizing this process? Should I be looking at a functional language?

The calculations are performed on arrays of numbers so for example a simple A+B could actually mean 100s of additions. I’m currently using Delphi, but this is not a requirement going forward. I’ll use the tool most suited to the job. Formulae may also be dependent on each other So we may have one formula C=A+B and a second one D=C+A for example.

  • 1 1 Answer
  • 3 Views
  • 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. 2026-05-11T04:24:46+00:00Added an answer on May 11, 2026 at 4:24 am

    Let’s assume your formulae (equations) are not cyclic, as otherwise you cannot ‘just’ evaluate them. If you have vectorized equations like A = B + C where A, B and C are arrays, let’s conceptually split them into equations on the components, so that if the array size is 5, this equation is split into

    a1 = b1 + c1 a2 = b2 + c2 ... a5 = b5 + c5 

    Now assuming this, you have a large set of equations on simple quantities (whether integer, rational or something else).

    If you have two equations E and F, let’s say that F depends_on E if the right-hand side of F mentions the left-hand side of E, for example

    E: a = b + c F: q = 2*a + y 

    Now to get towards how to calculate this, you could always use randomized iteration to solve this (this is just an intermediate step in the explanation), following this algorithm:

    1 while (there is at least one equation which has not been computed yet) 2   select one such pending equation E so that: 3     for every equation D such that E depends_on D: 4       D has been already computed 5   calculate the left-hand side of E 

    This process terminates with the correct answer regardless on how you make your selections on line // 2. Now the cool thing is that it also parallelizes easily. You can run it in an arbitrary number of threads! What you need is a concurrency-safe queue which holds those equations whose prerequisites (those the equations depend on) have been computed but which have not been computed themselves yet. Every thread pops out (thread-safely) one equation from this queue at a time, calculates the answer, and then checks if there are now new equations so that all their prerequisites have been computed, and then adds those equations (thread-safely) to the work queue. Done.

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

Sidebar

Related Questions

Currently, I have an Application which consists of a BasePage which as a header
I have an application in which I'm currently using a two column table in
I have a xPage application which shows list of emails of the currently logged
I have a POS web application which currently executes a java applet on page
I currently have a 32-bit .Net application (on x86 Windows) which require lots of
I have a Clustered Windows Hosting site which currently hosts an MVC Web Application
I'm currently working on an oophp application. I have a site class which will
I want to have a GUI application which would contain multiple tabs, each with
In our application we have some data structures which amongst other things contain a
I have a task tracking application, which is very basic. It currently has a

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.