Questions tagged [fp]

111 questions
12
votes
2 answers

Replacing dots with comma in `fp` result

I am using fp to add a few values in LaTeX. How can I replace the . in \erg with a comma (In Germany the comma is used as decimal mark). \documentclass{minimal} \usepackage{fp} \begin{document} \FPset\erg{0} \FPadd\erg{\erg}{23.20}…
Uwe Ziegenhagen
  • 13,168
  • 5
  • 53
  • 93
11
votes
3 answers

How to write Quadratic equation with negative coefficient

How to write Quadratic equation with negative coefficient in fp For a=1, b=-5, c= 6, $\ca x^2+\cb x + \cc=0$ gives 1x^2 + -5x + 6 But i want to have x^2 -5x + 6 \documentclass{beamer} \usepackage{fp} \begin{document} \begin{frame}{Quadratic…
sandu
  • 7,950
6
votes
2 answers

Using FP package to compute sum breaks: FP error: UPN stack is empty!

I am trying to sum up entries in a table and thought using the fp package was the way to go. The MWE below, \AddToTotal{18,000.00} \AddToTotal{-17,000.00} \AddToTotal{-8,000.00} yields: as expected. However, splitting the -8,000 into two steps…
Peter Grill
  • 223,288
4
votes
1 answer

Getting the equation number as an integer

I want to use the number of an equation as an integer value. Consider the following MWE: \documentclass{article} \usepackage[nomessages]{fp}% http://ctan.org/pkg/fp \begin{document} \begin{equation}\label{b1} a+b \end{equation} …
user31034
4
votes
2 answers

Array variable with fp package: How to use \FPeval in array?

I want use array along with fp package. \FPadd\xx{\somevalues(1)}{\somevalues(3)} works well \FPeval\xx{\somevalues(1)+\somevalues(1)} NOT working How to use \FPeval in…
sandu
  • 7,950
4
votes
1 answer

\widthof{} command in \FPeval

Could someone please tell me how I can use the \widthof{} command from the calc package within \FPeval from the fp…
user111
  • 411
3
votes
1 answer

How to use result of \FPeval computation "inline"?

Instead of writing something as, which works \documentclass{article} \usepackage{array} \usepackage{fp} \begin{document} \FPeval{\result}{4*0.3} %store the result in `\result` first then: \begin{tabular}[c]{| m{\result in} | m{\result in} |…
Nasser
  • 20,220
3
votes
2 answers

Issue with fp "missing number" macro

I write an fp macro that calculates the distance between frets on a guitar…
Uiy
  • 6,132
3
votes
2 answers

Is there a smart way to get a consistent accuracy with fp package?

Is there a smart way to get a consistent accuracy with fp package? I don't want to use round for…
2
votes
1 answer

How to pass a macro output to \FPeval?

How to pass a macro output \X{Tpeak} to \FPeval\Ypeak as shown in the following code? \documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \usepackage[nomessages]{fp} \newcommand\const[3][3]{% …
2
votes
1 answer

On the fp package: inverse sine function

On page 3/7 of the fp package we see the definition of the inverse sine function as below: \FParcsin#1#2 % #1 := arcsin(#2) From high school we may remember: Arcsin(0.5)=pi/6= 0.524 around. I got 0 for Arcsin(0.5) using fp package. Which is…
Aria
  • 1,523
2
votes
3 answers

How to store values in an array?

How to store a calculated value in array? zz(1) = ( xx(1) + yy(1) )/2 \fpeval\zz(\counter){(\xx(\counter)+\yy(\counter))/2} NOT…
sandu
  • 7,950
2
votes
1 answer

\FPeval not working in new command

\documentclass[10pt]{article} \usepackage{calc} \usepackage{fp} \newcommand{\test}[1]{ \makeatletter \setlength{\tempdimen}{\widthof{#1}} \FPeval\‌​resultaP(70-\strip@pt\tempdimen)/2} \makeatother} \begin{document} \test{5} \end{document} The…
user111
  • 411
2
votes
1 answer

Component Library and automatic calculations with FPeval

I have come upon a problem I'd like to solve but unable to by myself. My intention is to create a library of components with different parameters and do calculations with FPeval. Here is the code: \documentclass{article} \usepackage{fp}%…
MAAG
  • 67
1
vote
1 answer

On the fp package: repeat last test

On page 3/7 fp package documentation we read: %repeat last test \ifFPtest ...\else...\fi % repeat last test I really could not understand this. That is why I wrote a code as below to see what \ifFPtest…
Aria
  • 1,523
1
2