octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #31371] Factorial using Y combinator does not


From: anonymous
Subject: [Octave-bug-tracker] [bug #31371] Factorial using Y combinator does not work (MATLAB incompatibility)
Date: Tue, 19 Oct 2010 12:44:10 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Ubuntu/10.04 Chromium/7.0.517.41 Chrome/7.0.517.41 Safari/534.7

URL:
  <http://savannah.gnu.org/bugs/?31371>

                 Summary: Factorial using Y combinator does not work (MATLAB
incompatibility)
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Tue 19 Oct 2010 12:44:09 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: nandhp
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.2.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Lambda Calculus is a system of computation using only anonymous functions.
Church Numerals implement nonnegative integers in terms of function
composition. The Y combinator is a device in Lambda Calculus to implement
recursion:

  Y = @(f) C(@(g) f(@(x) C(g(g), x)), @(g) f(@(x) C(g(g), x)));

An implementation factorial over Church Numerals does not work past two. It
appears that Octave starts *losing* function parameter values when computing
Three Factorial and above.

Code that reproduces the bug is attached. I'll understand if this is too
complicated and esoteric to be fixed. :)



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 19 Oct 2010 12:44:10 PM UTC  Name: church-octave-bug.m  Size: 1kB  
By: None

<http://savannah.gnu.org/bugs/download.php?file_id=21720>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31371>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]