Thread: what is wrong in this simple code

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    24
    op was a big mistake of course ui=1.0; but my question now is focus in the results of u[i][j] that probably will 0's and 1's, could you advise me concerning this value u[i][j]
    thanks in advance

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Cahnging ui to 1.0 gives
    Code:
    -1.961893
    -1.532172
    -1.185623
    -0.906147
    -0.680764
    -0.499003
    -0.352422
    -0.234211
    -0.138880
    -0.062000
    0.000000
    0.050000
    0.100000
    0.150000
    0.200000
    0.250000
    0.300000
    0.350000
    0.400000
    0.450000
    0.500000
    0.550000
    0.600000
    0.650000
    0.700000
    0.750000
    0.800000
    0.850000
    0.900000
    0.950000
    1.000000
    1.062000
    1.138880
    1.234211
    1.352422
    1.499004
    1.680765
    1.906148
    2.185624
    2.532173
    2.961895
    -1.961893
    -1.532172
    -1.185623
    -0.906147
    -0.680764
    -0.499003
    -0.352422
    -0.234211
    -0.138880
    -0.062000
    0.000000
    0.050000
    0.100000
    0.150000
    0.200000
    0.250000
    0.300000
    0.350000
    0.400000
    0.450000
    ...
    I have no idea what they are supposed to be, and to figure out what goes wrong, I suppose you need to understand what the intermediate values are supposed to be, and what they really are.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. whats wrong with this very simple code?
    By sway1 in forum C++ Programming
    Replies: 2
    Last Post: 07-06-2008, 12:18 PM
  2. What's wrong with this code?
    By Luciferek in forum C++ Programming
    Replies: 4
    Last Post: 06-21-2008, 12:02 PM
  3. Whats wrong with this simple code?
    By o14v in forum C++ Programming
    Replies: 4
    Last Post: 03-19-2008, 01:46 PM
  4. What is wrong with my code? My first program......
    By coreyt1111 in forum C++ Programming
    Replies: 11
    Last Post: 11-14-2006, 02:03 PM