Changeset 3904 for trunk/examples

Show
Ignore:
Timestamp:
10/29/07 08:19:08 (15 months ago)
Author:
pmoura
Message:

Updated the "functions" example sample queries for compatibility with the ISO Prolog standard regarding representation of float numbers.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/examples/threads/functions/SCRIPT.txt

    r3894 r3904  
    1515% find the roots of some functions using each one of provided methods: 
    1616 
    17 | ?- bisection::find_root(f1, 1.0, 2.3, 1e-15, Zero). 
     17| ?- bisection::find_root(f1, 1.0, 2.3, 1.0e-15, Zero). 
    1818 
    1919Zero = 2.0 
    2020yes 
    2121 
    22 | ?- newton::find_root(f1, 1.0, 2.3, 1e-15, Zero). 
     22| ?- newton::find_root(f1, 1.0, 2.3, 1.0e-15, Zero). 
    2323 
    2424Zero = 2.0 
    2525yes 
    26 | ?- muller::find_root(f1, 1.0, 2.3, 1e-15, Zero). 
     26| ?- muller::find_root(f1, 1.0, 2.3, 1.0e-15, Zero). 
    2727 
    2828Zero = 2.0 
    2929yes 
    3030 
    31 | ?- bisection::find_root(f2, 1.0, 1.3, 1e-15, Zero). 
     31| ?- bisection::find_root(f2, 1.0, 1.3, 1.0e-15, Zero). 
    3232 
    3333Zero = 1.25809265664599 
    3434yes 
    3535 
    36 | ?- newton::find_root(f2, 1.0, 1.3, 1e-15, Zero). 
     36| ?- newton::find_root(f2, 1.0, 1.3, 1.0e-15, Zero). 
    3737 
    3838Zero = 1.25809265664599 
    3939yes 
    4040 
    41 | ?- muller::find_root(f2, 1.0, 1.3, 1e-15, Zero). 
     41| ?- muller::find_root(f2, 1.0, 1.3, 1.0e-15, Zero). 
    4242 
    4343Zero = 1.25809265664599 
     
    4747% find the roots of some functions running all methods at once using multi-threading: 
    4848 
    49 | ?- function_root::find_root(f1, 1.0, 2.3, 1e-15, Zero, Method). 
     49| ?- function_root::find_root(f1, 1.0, 2.3, 1.0e-15, Zero, Method). 
    5050 
    5151Zero = 2.0 
     
    5353yes 
    5454 
    55 | ?- function_root::find_root(f2, 1.0, 1.3, 1e-15, Zero, Method). 
     55| ?- function_root::find_root(f2, 1.0, 1.3, 1.0e-15, Zero, Method). 
    5656 
    5757Zero = 1.25809265664599 
     
    5959yes 
    6060 
    61 | ?- function_root::find_root(f3, 0.0, 3.0, 1e-15, Zero, Method). 
     61| ?- function_root::find_root(f3, 0.0, 3.0, 1.0e-15, Zero, Method). 
    6262 
    6363Zero = 1.4142135623731 
     
    6565yes 
    6666 
    67 | ?- function_root::find_root(f4, -1.0, 2.0, 1e-15, Zero, Method). 
     67| ?- function_root::find_root(f4, -1.0, 2.0, 1.0e-15, Zero, Method). 
    6868 
    6969Zero = -8.88178419700125e-16