[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] variable value changes
From: |
Xianwen Chen |
Subject: |
Re: [Tinycc-devel] variable value changes |
Date: |
Tue, 29 Nov 2011 11:17:38 -0700 |
Hi Grischka,
Thank you for testing the code.
Which version of tcc and on which platform were you running it? 'cause I got a different output (please see attached text file). I'm running tcc 0.9.25 on Windows 7, using binaries from:
In the output I produced, value of b changed to 9.752515, which is value of x2 when polynomial was first called.
x
On Tue, Nov 29, 2011 at 5:37 AM, grischka
<address@hidden> wrote:
Xianwen Chen wrote:
Hi,
Please have a look at the attached c code -- I'm writing a function to solve polynomial problems. The issue is that variable b's value changes when the function polynomial was called for the first time.
I'm using version 0.9.25 windows binary from the website.
"tcc -run WTP_computation_test.c" here produces the text
below. What is wrong with it?
--- grischka
beta1 = -1.881387,
beta2 = 0.071824,
beta3 = 0.309415 (0.309415),
beta4 = 0.707721 (0.707721),
beta5 = 0.693304 (0.693304)
{a, b, c} = {0.071824, -0.732196, 0.309415}
bSqrMns4ac = 0.447216
{x1, x2} = {0.441726, 9.752514}
WTP(MSC) = 0.441726, 9.752514
{a, b, c} = {0.071824, -0.732196, 0.707721}
bSqrMns4ac = 0.332784
{x1, x2} = {1.081257, 9.112983}
WTP(AB on cod) = 1.081257, 9.112983
{a, b, c} = {0.071824, -0.732196, 0.693304}
bSqrMns4ac = 0.336926
{x1, x2} = {1.056343, 9.137897}
WTP(AB on salmon) = 1.056343, 9.137897
-->(0)
_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
output.txt
Description: Text document