mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > YAFU

Reply
 
Thread Tools
Old 2021-07-07, 20:00   #1
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

124538 Posts
Default YAFU as a calculator?

Quick question:

If I'm in YAFU and enter something like 338^53, I get a value, but from the command line, if I enter ./yafu 338^53 (with or without quotes), it starts factoring. Is there a way to just get the value from the command line?

I'm actually looking for a manner to use YAFU within a Bash script to get values that are too large for the calculator..
EdH is offline   Reply With Quote
Old 2021-07-07, 20:13   #2
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

1110101001012 Posts
Default

Yes, the "expression" function.

Some time ago I decided that factor() should be yafu's default action and added this function for just this reason.

Code:
./yafu "expr(338^53)"
It prints the answer to stdout like so:

Code:
ans = 107791648724516899391794749922437879901663656637741542210620810142348006207593399220450871624756179567322798904744723676640112990486528
hopefully you can use that.

Last fiddled with by bsquared on 2021-07-07 at 20:15 Reason: output
bsquared is offline   Reply With Quote
Old 2021-07-07, 21:24   #3
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

5,419 Posts
Default

Thanks Ben,

This is exactly what I want. And, the -silent option works perfectly for providing just the value, so I won't have to parse.
EdH is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Aliaut Sum Calculator drmurat Aliquot Sequences 7 2020-07-01 09:28
Calculator Soup MattcAnderson Lounge 0 2019-10-29 05:19
Running YAFU via Aliqueit doesn't find yafu.ini EdH YAFU 8 2018-03-14 17:22
LL Credit Calculator swl551 Software 0 2012-12-04 17:49
Large Digit Calculator Primeinator Lounge 7 2006-02-16 23:11

All times are UTC. The time now is 20:23.


Fri Mar 31 20:23:41 UTC 2023 up 225 days, 17:52, 0 users, load averages: 0.80, 1.13, 1.08

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔