7 research outputs found

    Radix Conversion for IEEE754-2008 Mixed Radix Floating-Point Arithmetic

    Get PDF
    Conversion between binary and decimal floating-point representations is ubiquitous. Floating-point radix conversion means converting both the exponent and the mantissa. We develop an atomic operation for FP radix conversion with simple straight-line algorithm, suitable for hardware design. Exponent conversion is performed with a small multiplication and a lookup table. It yields the correct result without error. Mantissa conversion uses a few multiplications and a small lookup table that is shared amongst all types of conversions. The accuracy changes by adjusting the computing precision

    How to Read Floating Point Numbers

    Get PDF
    13 pagesConsider the problem of converting decimal scientific notation for a number into the best binary floating point approximation to that number, for some fixed precision. This problem cannot be solved using arithmetic of any fixed precision. Hence the IEEE Standard/or Binary Floating-Point Arithmetic does not require the result of such a conversion to be the best approximation. This paper presents an efficient algorithm that always·finds the best approximation. The algorithm uses a few extra bits of precision to compute an IEEE-conforming approximation while testing an intermediate result to determine whether the approximation could be other than the best. If the approximation might not be the best, then the best approximation is determined by a few simple operations on multiple-precision integers, where the precision is determined by the input When using 64 bits of precision to compute IEEE double precision results, the algorithm avoids higher-precision arithmetic over 99% of the time. The input problem considered by this papet is the inverse of an output problem considered by Steele and White: Given a binary floating point number, print a correctly rounded decimal representation of it using the smallest number of digits that will allow the number to be read without loss of accuracy. The Steele and White algorithm assumes that the input problem is solved; an imperfect solution to the input problem, as allowed by the IEEE standard and ubiquitous in current practice, defeats the purpose of their algorithm

    Xingo : compilação para uma representação intermediaria executavel

    Get PDF
    Orientador: Guido Costa Souza de AraujoDissertação (mestrado) - Universidade Estadual de Campinas, Instituto de ComputaçãoResumo: O aumento da complexidade dos novos projetos de microprocessadores aumentou consideravelmente a necessidade de compiladores que sejam capazes de gerar codigo altamente otimizado. Isto resultou em uma grande demanda por novas otimizações de codigo que possam fazer uso dos novos recursos da arquitetura do processador. Projetar tais otimizações e um trabalho muito complexo que requer uma plataforma de compilação flexivel e simples de usar. O compilador Xingo foi desenvolvido como uma ferramenta para auxiliar o trabalho de pesquisa em areas como otimização de codigo e arquitetura de computadores. Xingo e um compilador otimizante capaz de gerar codigo C a partir de sua representação intermediaria. Tal caracteristica auxilia o desenvolvedor a avaliar a corretude e o desempenho de novas otimizações de codigo. Xingo tambem e um compilador redirecionavel, isto e, pode ser facilmente portado para varias arquiteturas. O compilador Xingo possui oito otimizações independentes de maquina (meados de mar¸co de 2004) e que foram avaliadas com a ajuda do benchmark NullStone, o qual e um benchmark para compiladores de produção de alta qualidade, amplamente utilizado por companias da industria da computação. Do total de 6611 testes realizados pelo NullStone, o Xingo produziu codigo correto para 6581 (99,54%) sem a aplicaçao de nenhuma otimização. Depois da aplicação de todas as otimizações disponiveis, o Xingo produziu codigo correto para 6497 testes (98,27%). Estes numeros refletem a qualidade da plataforma de compilação Xingo, abrindo uma nova gama de oportunidades de pesquisa nas 'areas de tecnologias de compila¸c¿ao e projeto de arquiteturas no Laboratorio de Sistemas de Computação (IC-UNICAMP). Pretende-se tornar o Xingo de dominio publico em meados de 2005Abstract: The increasing complexity of the new microprocessor designs has considerably increased the pressure for compilers that are capable of generating highly optimized code. This has resulted in a great demand for new code optimizations which can make an effective usage of the processor architectural resources. Designing such optimnizations is usually a very complex task that requires a flexible and easy to use compiler platform. The Xing'o compiler was designed as a tool to help researchers working in areas like compiling optimization and computer architecture. Xing'o is an optimizing compiler capable of generating compilable C code from its intermediate representation. Such feature considerably helps the designer in evaluating the correcteness and performance of new code optimization techniques. Xingo is also a retargetable compiler, that is, it can be easily ported for several architectures. The Xingo compiler has eight machine independent code optimizations (circa March 2004) and was evaluated with the help of the NullStone benchmark, a roduction-quality compiler benchmark, largely used by companies in the computer industry. Out of the 6611 programs available at Nullstone, Xing'o produced correct code for 6581 (99,54%) without the application of any optimization. After applying all the available optimizations, Xingo produced correct code for 6497 programs (98,27%). These numbers reflect the quality of the Xing'o compiling platform, opening up a new set of research opportunities in areas like compiling technology and architecture design at the Computer Systems Laboratory, (IC-UNICAMP). Xingo is planned to go on public domain by early 2005MestradoCiência da ComputaçãoMestre em Ciência da Computaçã
    corecore