Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles; site smu.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!inuxc!pur-ee!uiucdcs!smu!pedz From: pedz@smu.UUCP Newsgroups: net.lang Subject: Re: Implementation of scientific functio - (nf) Message-ID: <19700002@smu.UUCP> Date: Mon, 11-Jun-84 14:48:00 EDT Article-I.D.: smu.19700002 Posted: Mon Jun 11 14:48:00 1984 Date-Received: Wed, 13-Jun-84 00:22:02 EDT References: <1905@sdccsu3.UUCP> Lines: 28 Nf-ID: #R:sdccsu3:-190500:smu:19700002:000:1277 Nf-From: smu!pedz Jun 11 13:48:00 1984 #R:sdccsu3:-190500:smu:19700002:000:1277 smu!pedz Jun 11 13:48:00 1984 I am not sure I understand your question. Basically you need to write a library of functions which implement the apropriate algorithm for each function, e.g., trig fuctions are done by taylor series, square root can be done by logrithms or by a successive approximation. There is a great deal of science which goes into a math package in order to get the most amount of precision. The package is then stored somewhere (in compiled form hopefully) and linked in when needed. If the language is such that external items do not exist, then the source code can be included with each compilation much like includes are done in C. When the compiler sees a reference to a function, it can set a flag when will cause the proper file to get included eventually. Yet another way is to place the compiled code in a file. When a function is referenced, it is treated as a reference to a function with a jump to a yet unknown address. Then the binary code is appended to the code just produced and the jumps are back patched. This is simular to having external procedures except the references get resolved at "compile" time. Is this what you wanted to know? I can give you references for books which detail how to design your functions if you need that. Perry convex!smu!pedz