• CMATH for Borland C/C++ é uma útil e vasta biblioteca para o complexo-número de aritmética e matemática, tanto em coordenadas cartesianas como em polares, para C/C++ e Pascal/Delphi compiladores. CMATH está disponível como um produto independente. Ele também está incluído no OptiVec pacote. Todas as funções podem, em alternativa, ser chamado de clássico C e Pascal/Delphi com o tipo específico de nomes de função (como cf_sin, cd_exp, pe_sqrt), ou a partir de C++ e Delphi com sobrecarregado de nomes de funções e operadores (como pecado, exp, sqrt, o operador +; apenas os operadores em C++). Na medida do possível, todas as funções têm os mesmos nomes em Pascal/Delphi versão em C/C++ versão. Maior velocidade, precisão e segurança são alcançados por meio da implementação em linguagem de Montagem (em oposição à compilado ou código embutido disponível complexo C++ bibliotecas de classe). Só para as mais simples tarefas, alternativa inline funções de C++ são utilizados em C++ versão. Quanto ao escopo de CMATH sobrepõe-se com o complexo de implementações de classe do Visual C++, Borland C++, Delphi, CMATH é uma substituição de alta qualidade para os últimos, que são todos muito ineficiente e imprecisas. Em contraste com os escritos de-down-e-compilado do livro de fórmulas de outros complexo de bibliotecas (incluindo aqueles que vêm com o Visual C++ e o Borland compiladores), a implementação de CMATH foi guiado pelas seguintes regras: Sem qualquer compromisso, a prioridade é sempre dada à matematicamente correta resultado, com a precisão exigida para o respectivo tipo de dados. Especialmente para funções complexas, que necessita de uma profunda do tratamento de muitas situações diferentes. Para este fim, vários casos têm de ser distinguidas com o pedante cuidados. (Livro de fórmulas não precisa tratar estas situações separadamente, como eles, teoricamente, assumir infinita precisão de resultados intermediários; uma implementação real, no entanto, tem de trabalhar com a precisão limitada dada por vida real processadores.) Funções matemáticas deve ser "seguro" em todas as circunstâncias. Eles podem, por nenhum motivo, simplesmente falha, mas tem que realizar um bom tratamento de erro. Isso é verdadeiro mesmo - e talvez principalmente - por aparentemente absurdo argumentos, com a única exceção de não-números INF e NAN, que ocorrem a si mesmos apenas como resultado de erros graves em outras funções. Por todos os meios possíveis, maior velocidade de execução, devem ser atingidos. (Afinal, você não comprou o seu computador rápido para nada!) O código de programa tem que ser o mais compacto possível. No entanto, em caso de conflitos, mais rápida a velocidade de execução é sempre prioridade sobre o de menor tamanho do código.
  • Borland C/C++ için CMATH karmaşık sayı aritmetik ve matematik, kartezyen hem de kutupsal koordinatlarda ve C/C++ ve Pascal/Delphi derleyici için için yararlı ve kapsamlı bir kütüphane. CMATH tek başına bir ürün olarak kullanılabilir. Ayrıca OptiVec pakete dahil. Tüm fonksiyonlar alternatif olarak klasik C ve Pascal/Delphi (cf_sin, cd_exp, pe_sqrt gibi), veya C++ ve Delphi (sin, exp, Karekök, operator + gibi) aşırı fonksiyon isimleri ve operatörleri ile; operatörler yalnızca C++ türüne özgü işlevi adlar olabilir. Mümkün olduğunca, tüm fonksiyonları C/C++ sürümü olarak Pascal/Delphi sürümünde aynı isimler var. Üstün hız, doğruluk ve güvenliği (kullanılabilir karmaşık C + + sınıf kitaplıkları derlenmiş ya da satır içi kod aksine) uygulaması ile Assembly dilinde elde edilir. Sadece en basit görevler için, alternatif satır içi C++ fonksiyonlar C++ sürüm kullanılır. Visual C++, Borland C++ karmaşık sınıf uygulamaları ile örtüşmektedir CMATH kapsamında kadarıyla, ve Delphi, CMATH tüm oldukça verimsiz ve yanlış olan ikincisi için yüksek kaliteli yedek. (Visual C++ ve Borland derleyici ile gelenler de dahil olmak üzere birçok mevcut karmaşık kütüphaneler aşağı yazılmış ve derlenmiş Ders Kitabı formülleri aksine, CMATH uygulanmasında aşağıdaki kurallar tarafından yönlendiriliyordu: Herhangi bir uzlaşma olmadan, en yüksek öncelik her zaman doğruluğuyla ilgili veri türü için istenen matematiksel olarak doğru sonucu verilir. Özellikle karmaşık fonksiyonlar için, bu birçok farklı durumlarda çok kapsamlı bir tedavi gerektirir. Bu amaçla, çeşitli vakaları titiz bir özenle ayırt edilmelidir. Teorik olarak ara sonuçlar sonsuz doğruluğu kabul (Ders Kitabı formülleri ayrı ayrı bu gibi durumlarda tedavi gerekmez; gerçek bir uygulama, ancak, gerçek hayat işlemciler tarafından verilen sınırlı doğruluğunu kontrol etmek.) Matematiksel fonksiyonlar her koşulda güvenli "olmalıdır. Hiçbir nedeni sadece crash için olabilir, ama iyi bir hata bir tedavi yapmak zorunda. Bu görünüşte saçma argüman için - ve belki de özellikle bile, sadece diğer fonksiyonları ciddi hatalar sonucunda kendilerini meydana gelen sayıları INF ve NAN, sigara hariç doğrudur. Mümkün olan tüm yollarla, en büyük yürütme hızı elde edilmelidir. (Tüm sonra, hiçbir şey için hızlı bir bilgisayar satın almak değil!) Program kodu mümkün olduğunca küçük olmalı. Ancak, çakışma durumunda, daha hızlı yürütme hızı her zaman daha küçük kod boyutu öncelik verilir.
  • CMATH for Borland C/C++ is a useful and comprehensive library for complex-number arithmetics and mathematics, both in cartesian and in polar coordinates, for C/C++ and Pascal/Delphi compilers. CMATH is available as a stand-alone product. It is also included in the OptiVec package.

    All functions may alternatively be called from classic C and Pascal/Delphi with type-specific function names (like cf_sin, cd_exp, pe_sqrt), or from C++ and Delphi with overloaded function names and operators (like sin, exp, sqrt, operator +; operators only in C++). As far as possible, all functions have the same names in the Pascal/Delphi version as in the C/C++ version.

    Superior speed, accuracy and safety are achieved through the implementation in Assembly language (as opposed to the compiled or inline code of available complex C++ class libraries). Only for the most simple tasks, alternative inline C++ functions are used in the C++ version.

    As far as the scope of CMATH overlaps with the complex class implementations of Visual C++, Borland C++, and Delphi, CMATH is a high-quality replacement for the latter, which are all quite inefficient and inaccurate.

    In contrast to the written-down-and-compiled textbook formulas of most other available complex libraries (including those coming with Visual C++ and the Borland compilers), the implementation of CMATH was guided by the following rules:

    Without any compromise, top priority is always given to the mathematically correct result, with the accuracy demanded for the respective data type. Especially for complex functions, this necessitates a very thorough treatment of many different situations. To this end, the various cases have to be distinguished with pedantic care. (Textbook formulas do not need to treat these situations separately, as they theoretically assume infinite accuracy of intermediate results; an actual implementation, however, has to work with the limited accuracy given by real-life processors.)

    Mathematical functions must be "safe" under all circumstances. They may for no reason simply crash, but have to perform a decent error treatment. This is true even - and perhaps especially - for seemingly nonsense arguments, with the single exception of the non-numbers INF and NAN, which occur themselves only as a result of serious errors in other functions.

    By all possible means, greatest execution speed must be attained. (After all, you did not buy your fast computer for nothing!)

    The program code has to be as compact as possible. However, in case of conflicts, faster execution speed is always given priority over smaller code size.