小编YHV*_*HVH的帖子

XP上的Emacs,tramp,plink问题

目标计算机正在运行Ububtu服务器8.04.
这是tramp输出:

tramp: Opening connection for nungu@ip.ip.ip.ip using nil...<br>
tramp: Waiting for prompts from remote shell<br>
tramp: Waiting 60s for prompt from remote shell<br>
tramp: Sending password<br>
tramp: Found remote shell prompt.<br>
tramp: Initializing remote shell<br>
Loading time-date...done<br>
tramp: Waiting 30s for remote `/bin/sh' to come up...<br>
tramp: Setting up remote shell environment

apply: Couldn't `stty -inlcr -echo kill '^U'', see buffer `*tramp/plink nungu@ip.ip.ip.ip*'
Run Code Online (Sandbox Code Playgroud)

编辑,详细缓冲区包含此结尾:

# Waiting 30s for remote `/bin/sh' to come up...
exec env 'ENV=' 'PROMPT_COMMAND=' 'PS1=$ ' …
Run Code Online (Sandbox Code Playgroud)

emacs windows-xp plink tramp

6
推荐指数
1
解决办法
2603
查看次数

使用GMP的bignum方根

我需要准确地得到210位数的平方根,我认为GMP是正确的工具,我做错了什么?

#include <stdlib.h>
#include <stdio.h>
#include "gmp.h"

int
main (int argc, char *argv[])
{
  mpz_t sq_me, sq_out, test;
  mpz_init(sq_me);
  mpz_init(sq_out);
  mpz_init(test);
  mpz_set_str (sq_me, argv[1], 10);

  mpz_sqrt(sq_out, sq_me);
  mpz_mul(test,sq_out,sq_out);

  gmp_printf ("%Zd\n\n", sq_out);
  gmp_printf ("%Zd\n\n", test);

  return 0;
}
Run Code Online (Sandbox Code Playgroud)

输入:

24524664490027821197651766357308801846702678767833275974341445171506160083003858 72169522083993320715491036268271916798640797767232430056005920356312465612184658 17904100131859299619933817012149335034875870551067

输出:

49522383313031109809242226159886283348695660460381271324714928680654813093947239 9634016783775955618921028

24524664490027821197651766357308801846702678767833275974341445171506160083003858 72169522083993320715491034366358025027526868495267716284867043049443779615862887 47102011391915422793532619329760963626718900576784

c gmp bignum

6
推荐指数
2
解决办法
5802
查看次数

标签 统计

bignum ×1

c ×1

emacs ×1

gmp ×1

plink ×1

tramp ×1

windows-xp ×1