Citizendium Forums
November 24, 2009, 10:56:08 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: POSTING RULES FOR MAIN CZ BOARDS: (1) The CZ Forums are Citizens-only (a "Citizen" is a Citizendium member). Non-Citizens may use only the "Non-member discussion" and "General help" boards, but still must register before posting (it's easy!). Non-Citizen posts elsewhere will be summarily deleted. (2) All must now use their own real names. To edit your displayed name, click on Profile > Account Related Settings. (3) Citizens must now link to their CZ user pages. To edit your signature, click on Profile > Forum Profile Information.
Click here to return to the wiki
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Numerical code  (Read 3847 times)
Paul Wormer
Forum Communicator
***
Posts: 281


« on: May 27, 2008, 08:51:41 AM »

Today I noticed that Dmitrii Kouznetsov put some computer code (in the language C) into CZ. This could be very useful,  provided the code is stable (no numerical errors for unusual cases) and bug-free. But the problem is, how do we know this? This will be very hard to test for other CZ contributors, including editors. In practice it means that we will have to trust the author of the code. My  programming experience of 41 years (yes, I'm not getting any younger  Embarrassed) makes me hesitant about trusting any code, expecially numerical code.

Are there any ideas on how to deal with code submission? How do public libraries assert correctness etc.?
Logged

Dmitrii Kouznetsov
New Arrival
*
Posts: 3


« Reply #1 on: May 27, 2008, 10:10:28 AM »

Paul, thank you for araising this question. The things should be declared at very beginning, while we do not have many codes posted. <quote> Are there any ideas on how to deal with code submission?</quote> Yes. There are!
*1. The code should be specific, it should generate a figure, used in CZ article(s). No computer games.
*2. The code should be self-consistent. All components (if any) should be available at CZ.
*3. The code should be ascii.
*4. The code should be short. (I apologise for the "conto").
*5. I agree to check some codes uploaded by other users in C++, Maple and Mathematica.
*6. Let the author of code argue that this code and the picture generated are important for the encyclopedy. You may write a bot to post the same set of questions to the discussion pages, (Why important? Did you checked it? and so on)

As for my codes, Henryk Trappmann checks them. In particular, he could use the program [[ContourPlot/code/conto.cin]]; he already has posted the plot made with this program at http://math.eretrandre.org/tetrationforum/showthread.php?tid=147&pid=2169#pid2169 , (see ''attached file'' there). I hope, it is the most complicated among my codes. I asked Henryk to check my today's post. By the way, past week, he applied for CZ, but did not yet get the access.. What happened?
Logged
a.a.s.
Forum Communicator
***
Posts: 152


« Reply #2 on: May 27, 2008, 03:51:43 PM »

Quote
How do public libraries assert correctness etc.?
I have no idea. My PARI/GP library says "It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY WHATSOEVER.".
I'd like to add the same text to my figures on CZ:Statistics Wink

Reading on contour plot I want to believe that the picture is a typical one. I want to understand its meaning first, not the production process. Almost the same is true for more "numerically involved" example of errors for gaussian quadratures. Well, maybe I'd like to learn some typical/general algorithms that produce described results. In any case it should be short, highly readable and of general interest. But a code for a particular image is merely a piece of technical documentation. I don't think our images (as e.g. contour plot or even errors of quadratures) really need this.

In general, I see some other role for code on CZ. It should be an illustration or precise notation for general methods, never ever intended to be a "production" code. An excellent example in this regard could be  e.g. Golub & Van Loan "Matrix computation".
Others may have different ideas.
 
Logged

Aleta Curry
Forum Regular
****
Posts: 1105


« Reply #3 on: May 27, 2008, 04:23:46 PM »

Today I noticed that Dmitrii Kouznetsov put some computer code (in the language C) into CZ. This could be very useful,  provided the code is stable (no numerical errors for unusual cases) and bug-free. But the problem is, how do we know this?
snip!

Are there any ideas on how to deal with code submission? How do public libraries assert correctness etc.?

Paul, thanks for being Johnny-on-the-Spot!  I of course have no idea what you're talking about, but it's good to know people are paying attention to computer security matters.

You're not getting younger?  Neither am I, but I'm holding.  You should try my method:  I've been 38 for *years*!

Dmitrii:  thanks for your efforts.  If your acquaintance still hasn't heard back re registration, he should check with an e-mail to Administration (they may not spot your query here).

Also, could you please place a link to your CZ page in your signature?  That's required so we all know whom we're talking to.  Thanks!
Logged

http://en.citizendium.org/wiki/User:Aleta_Curry

Lady Astor, to Winston Churchill:  Sir, if you were my husband, I'd put poison in your tea!

Churchill:  Madam, if I were your husband, I'd drink it!
Dmitrii Kouznetsov
New Arrival
*
Posts: 3


« Reply #4 on: May 28, 2008, 05:53:35 PM »

..Are there any ideas on how to deal with code submission?..
..
Dmitrii:  thanks for your efforts.  If your acquaintance still hasn't heard back re registration, he should check with an e-mail to Administration (they may not spot your query here).

Also, could you please place a link to your CZ page in your signature? 
Aleta: Here is my homepage at CZ: http://en.citizendium.org/wiki/User:Dmitrii_Kouznetsov
Here is my email: dima@ils.uec.ac.jp

I understand the crytics by  Paul. I go to upload simple codes. Here is an example: url=http://en.citizendium.org/wiki/FixedPointsLoge00/code.
P.S. Is it good, to generate two figures in one source, or I should separate the code for 3 parts?
« Last Edit: May 31, 2008, 03:30:37 AM by Dmitrii Kouznetsov » Logged
Jitse Niesen
Forum Participant
**
Posts: 100



« Reply #5 on: June 04, 2008, 09:53:06 AM »

As I understand it, this is about pages like [[FixedPointsLoge00/code]]. Here, the code explains how certain plots are generated. I think this can be quite useful. It allows me (in theory) to make small changes to the picture, if for instance I don't like the colours or if I think the numbers should be bigger. If the code were not there, I would either have to ask Dmitrii to change the picture (difficult if he decides to leave Citizendium) or I would have to go through the effort of remaking the picture myself. (In practice, the code isn't useful to me because Dmitrii uses a program I don't have access to.) So, I think code that is used to generate plots is useful for CZians in that it enables collaboration (though it is rarely useful for our readers) and should thus be accommodated.
Logged

Dmitrii Kouznetsov
New Arrival
*
Posts: 3


« Reply #6 on: June 05, 2008, 05:44:34 AM »

Dmitrii uses a program I don't have access to.
Jitse, what soft do you have access to? Right now I cannot rewrite the codes for other languages, I have to do some urgent work, but I hope to finish it within one month; then I shall consider your suggestions.
Logged
Jitse Niesen
Forum Participant
**
Posts: 100



« Reply #7 on: June 06, 2008, 05:28:24 AM »

Jitse, what soft do you have access to? Right now I cannot rewrite the codes for other languages, I have to do some urgent work, but I hope to finish it within one month; then I shall consider your suggestions.

I use Matlab for generating plots. I can also do Maple and Octave / Gnuplot, but I didn't like their output last time I tried (some years ago though). But Mathematica is also a standard piece of software that many mathematicians do have access to; I don't think it's a worthwhile use of your time to convert your plot from Mathematica to another language just for the sake of it. I would say, just go for the program you like best.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!