#!/usr/bin/perl -s our ($som); my $example = shift ; use strict; use Lingua::PT::Speaker; use utf8; binmode(STDOUT, ":utf8"); my $n; while(){ chomp; next if /^#/; next unless /\w/; $n++; next if (defined $example and $n != $example); my $a = Lingua::PT::Speaker::Numbers::math($_); $a =~ s/ +/ /g; print "====($n)\n$_\n$a\n"; if ($som){ open(F,"|pt-speak 2> /dev/null") or die; print F $a; close F; } } __DATA__ x b b^2 b 2 b2 3.5 3.4 % 1.0001 11.02 11.123 1 + 3 1+3+12 1.3 + 3.43 + 12.221 1.0001 + 3.43 + 12.221 log(x) log10(x) sqrt(2) sqrt4(2) pi * r ^ 2 log x + cos 3 . 3 x 2 + x - 5 = 0 . 3 * x 2 + 5 x + 30 . 3.3 + 3 * x 2 + x / 5 + 30 . a /\ b \/ d <=> c x1 ^ 3 + b12 = 0 #Formula resolvente: x = ( -b +- sqrt(b 2 - 4 a c)) / 2 a x = ( -b +- sqrt(b^2 - 4 a c)) / (2 a) #complicações a caminho... x = ( -b ± sqrt(b² - 4 a c)) / ( 2 a) x ∈ { 1, 2, 3 } a = π r² a ≠ 0 a = 4/3 * pi r ^3 a = 4/3 * π r^3