Sponsored Content
Full Discussion: Unix on Mac
Top Forums UNIX for Dummies Questions & Answers Unix on Mac Post 19359 by Neo on Wednesday 10th of April 2002 06:53:12 AM
Old 04-10-2002
Quote:
Originally posted by LivinFree
You could always fall back on "export $TERM=vt100" before you run vi... see if that helps.
.... if you are a KSH user.
 

7 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

Mac OS X & Unix.

Are the Terminal commands used in Mac OS 10.1.3 the same as those found on a real Unix system? if they are, what book would you recommend as a terminal refferance guide? I already have 'The Missing Manual' by O'Reilly, but there ain't much in terms of managing the system via the terminal :( ... (9 Replies)
Discussion started by: LAdesign
9 Replies

2. OS X (Apple)

unix flavour on mac

I'm quite interested in resusing an old bondi iMac i have as a unix box, and i was wondering what distro people would recomend. I had thought of using BSD/FreeBSD cos thats what osx is based on. I'm doing this as a teaching excercise (for myself) so i'm looking for something achievable rather than... (9 Replies)
Discussion started by: ora
9 Replies

3. OS X (Apple)

mac unix

Can anyone tell me were to download unix software for Mac OS X (10 Replies)
Discussion started by: ezadea
10 Replies

4. UNIX for Dummies Questions & Answers

mac unix

hi, i'm running mac 10.5, and i have a file eg. program after i compiled on the terminal using this command; cc -o program program.c however, i'm unable to see the process hierachy for that program. i tried using "ps -C program -l --forest" and unable to see the tree structure. need... (1 Reply)
Discussion started by: grotesque
1 Replies

5. OS X (Apple)

Mac OS X & UNIX

I just joined the Forum a few days ago! :) I have a mac book and decided to look under the hood. Low and behold, UNIX! To be honest, I know nothing about unix, but I want to learn. I have no real goals as of yet, other than to learn what I can. I do own a few domains hosted by a good company. ... (4 Replies)
Discussion started by: fellojello
4 Replies

6. OS X (Apple)

Unix on a Mac OS X

Hi. I'm using a Mac computer to perform all my Unix operations. At the moment, I'm employing osascript to interact between windows and don't know whether the same is possible to do it on a BASH shell without calling osascript. If so, I would like to see an example of how to do it. Many thanks in... (0 Replies)
Discussion started by: hresquivelo
0 Replies

7. UNIX for Dummies Questions & Answers

unix on mac

Hello, I formated my hard disk and i recovered some videos, but the thing is the videos were in .MOV format and now there are just UNIX executable files, i tried to write at the end of the name the extension but quicktime didn't recognize me the videos, somebody can help me with this problem... (1 Reply)
Discussion started by: arielorc
1 Replies
math::fuzzy(n)							 Tcl Math Library						    math::fuzzy(n)

__________________________________________________________________________________________________________________________________________________

NAME
math::fuzzy - Fuzzy comparison of floating-point numbers SYNOPSIS
package require Tcl ?8.3? package require math::fuzzy ?0.2? ::math::fuzzy::teq value1 value2 ::math::fuzzy::tne value1 value2 ::math::fuzzy::tge value1 value2 ::math::fuzzy::tle value1 value2 ::math::fuzzy::tlt value1 value2 ::math::fuzzy::tgt value1 value2 ::math::fuzzy::tfloor value ::math::fuzzy::tceil value ::math::fuzzy::tround value ::math::fuzzy::troundn value ndigits _________________________________________________________________ DESCRIPTION
The package Fuzzy is meant to solve common problems with floating-point numbers in a systematic way: o Comparing two numbers that are "supposed" to be identical, like 1.0 and 2.1/(1.2+0.9) is not guaranteed to give the intuitive result. o Rounding a number that is halfway two integer numbers can cause strange errors, like int(100.0*2.8) != 28 but 27 The Fuzzy package is meant to help sorting out this type of problems by defining "fuzzy" comparison procedures for floating-point numbers. It does so by allowing for a small margin that is determined automatically - the margin is three times the "epsilon" value, that is three times the smallest number eps such that 1.0 and 1.0+$eps canbe distinguished. In Tcl, which uses double precision floating-point numbers, this is typically 1.1e-16. PROCEDURES
Effectively the package provides the following procedures: ::math::fuzzy::teq value1 value2 Compares two floating-point numbers and returns 1 if their values fall within a small range. Otherwise it returns 0. ::math::fuzzy::tne value1 value2 Returns the negation, that is, if the difference is larger than the margin, it returns 1. ::math::fuzzy::tge value1 value2 Compares two floating-point numbers and returns 1 if their values either fall within a small range or if the first number is larger than the second. Otherwise it returns 0. ::math::fuzzy::tle value1 value2 Returns 1 if the two numbers are equal according to [teq] or if the first is smaller than the second. ::math::fuzzy::tlt value1 value2 Returns the opposite of [tge]. ::math::fuzzy::tgt value1 value2 Returns the opposite of [tle]. ::math::fuzzy::tfloor value Returns the integer number that is lower or equal to the given floating-point number, within a well-defined tolerance. ::math::fuzzy::tceil value Returns the integer number that is greater or equal to the given floating-point number, within a well-defined tolerance. ::math::fuzzy::tround value Rounds the floating-point number off. ::math::fuzzy::troundn value ndigits Rounds the floating-point number off to the specified number of decimals (Pro memorie). Usage: if { [teq $x $y] } { puts "x == y" } if { [tne $x $y] } { puts "x != y" } if { [tge $x $y] } { puts "x >= y" } if { [tgt $x $y] } { puts "x > y" } if { [tlt $x $y] } { puts "x < y" } if { [tle $x $y] } { puts "x <= y" } set fx [tfloor $x] set fc [tceil $x] set rounded [tround $x] set roundn [troundn $x $nodigits] TEST CASES
The problems that can occur with floating-point numbers are illustrated by the test cases in the file "fuzzy.test": o Several test case use the ordinary comparisons, and they fail invariably to produce understandable results o One test case uses [expr] without braces ({ and }). It too fails. The conclusion from this is that any expression should be surrounded by braces, because otherwise very awkward things can happen if you need accuracy. Furthermore, accuracy and understandable results are enhanced by using these "tolerant" or fuzzy comparisons. Note that besides the Tcl-only package, there is also a C-based version. REFERENCES
Original implementation in Fortran by dr. H.D. Knoble (Penn State University). P. E. Hagerty, "More on Fuzzy Floor and Ceiling," APL QUOTE QUAD 8(4):20-24, June 1978. Note that TFLOOR=FL5 took five years of refereed evolution (publication). L. M. Breed, "Definitions for Fuzzy Floor and Ceiling", APL QUOTE QUAD 8(3):16-23, March 1978. D. Knuth, Art of Computer Programming, Vol. 1, Problem 1.2.4-5. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category math :: fuzzy of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
floating-point, math, rounding CATEGORY
Mathematics math 0.2 math::fuzzy(n)
All times are GMT -4. The time now is 03:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy