Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

near? function (See related posts)

    near?: func [
        {Returns true if the values are <= 1E-15 apart.}
        value1 [number! money! time!]
        value2 [number! money! time!]
        /within  "Specify an alternate maximum difference (epsilon)."
            e [number! money! time!] "The epsilon value."
    ][
        e: abs any [e  to value1 1E-15]
        e >= abs value1 - value2
    ]

Comments on this post

gregg.irwin posts on Jan 10, 2006 at 00:13
I couldn't use "near?" as a tag, which is a shame as that's the function name.

You need to create an account or log in to post comments to this site.


Click here to browse all 4858 code snippets

Related Posts