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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:06:51+00:00 2026-06-01T07:06:51+00:00

I am debugging optimization routine. I produce a log text file where I track

  • 0

I am debugging optimization routine. I produce a log text file where I track objective function value at each iteration in optimization routine.

Here is the context: I work with a curve fitting problem, with a model that is linear in the four parameter, and polynomial in the X data

Y = PARAM1*X^3+PARAM2*X^2+PARAM3*X+PARAM4

and I run optimization routine on unnoised unbiased data generated from this model so as to test the algorithm.

In log file, first optimization step show no problem. Function evaluations have a double value. At each iteration, 5 function values are calculated (and displayed in log file). From a given iteration, things turn sour: one function evaluation becomes -1#INF although objective function has already been successfully evaluated at this very point (!). In the next iterations, the ‘bad point’ keeps evaluating at -1#INF, and one by one other points also end up evaluated at -1#INF. The calculation of Y at these points is no struggle given the formula and given the fact that they were properly evaluated before.

Also, I suspect another cause, like memory management. Would you have any idea about this, or any advice to track the problem closer?


Edit

I see the first occurrence of -1#INF in log file. Function is evaluated at 5 points at each iteration, but only one of those 5 points is a ‘new point’. When -1#INF first appears, function has already been successfully evaluated at this point.

It looks like

ITERATION N-1
f1 559.011
f2 560.034
f3 562.034
f4 560.342
f5 560.344

ITERATION N 
f1 -1#INF
f2 560.034
f3 558.034
f4 560.342
f5 560.344

where at ITERATION N only f3 is a function evaluation at a new point, and f1 is the function evaluation at the same point than is f1 in ITERATION N-1.

  • 1 1 Answer
  • 0 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. Editorial Team
    Editorial Team
    2026-06-01T07:06:52+00:00Added an answer on June 1, 2026 at 7:06 am

    Infinity propagates in calculations. The biggest odds are that the polynomial produced -Inf because X was already -Inf. With the biggest odds that this is caused by calculation for X that divided by zero. Work your way back and add code that checks for zero in divisions.

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

Sidebar

Related Questions

Debugging an iterator method in VS2010 SP1 (with DEBUG settings... no compiler optimization), one
For debugging, it is often useful to tell if a particular function is higher
I wonder where to put the optimization and debugging options in Makefile: linking stage
How do you set optimization/debugging flags in Eclipse CDT, set up uses GNU tool-chain
I found a lot of Optimization Options here While going through them I found
Debugging one of my projects I noticed another developer had changed the $(document).ready() function
I'm at the debugging/optimization phase with an iPhone app. I have one bottleneck left
Does anybody experience mixing -g (debugging symbols) and -O2 (best safe optimization) with gcc
Debugging a Firefox addon is a slow process: (1) edit source code in a
Debugging a PHP program, is there any add-on/plug-in for browser which I can view

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.