Культурный офтопик
 help / color / mirror / Atom feed
From: gns@altlinux.ru
To: gns@altlinux.ru
Cc: "культурный офтопик" <smoke-room@lists.altlinux.org>
Subject: [room] Щодо: Двоичные числа
Date: Thu, 8 Feb 2007 17:52:28 +0200
Message-ID: <a4ab440f0702080752u347811dgc486098766e6f07a@mail.gmail.com> (raw)

кстати запятая по ходу сохраняет место - бишь можно отдельно  целую
часть отконвертить, а потом дробну ю: 0,26712 представить и
отконвертить как целое 26712 , а потом тупо дописать результат после
запятой (потому что значение разрядов сохранится, ибо 1/2 это 64/128)


2007/2/8, gns@altlinux.ru <gns@altlinux.ru>:
> как и десятичная дробь:
>
> 0,abcdefg... = a/2+b/4+c/8+d/16+e/32+f/64+g/128
>
> и алгоритм соответсвенно близко к алгоритму для целых
>
> 2007/2/8, Eugene Ostapets <eostapets@gmail.com>:
> > Попросили знакомым написать рассчетку для ленивого дитяти... А там в
> > задании необходимо среди прочего барахла превратить дробное число из
> > десятичного в двоичное... С точностью не менее 8 знаков в дробной
> > части... Забег по склерозу подсказал что в мои годы мы занимались
> > только целыми числами... Кто-то помнит/знает правила для записи
> > дробного числа в двоичном формате?
> >
> > --
> > С уважением,
> > Евгений Остапец
> > uin: 23747217
> > jid: eugene_ostapets@jabber.ru
> > _______________________________________________
> > smoke-room mailing list
> > smoke-room@lists.altlinux.org
> > https://lists.altlinux.org/mailman/listinfo/smoke-room
>

             reply	other threads:[~2007-02-08 15:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-08 15:52 gns [this message]
2007-02-08 15:57 ` Damir Shayhutdinov
2007-02-08 16:00   ` gns
2007-02-08 16:31     ` Eugene Ostapets
2007-02-08 17:01       ` Damir Shayhutdinov
2007-02-08 17:05         ` Damir Shayhutdinov
2007-02-09  6:47           ` Andrew Borodin
2007-02-08 21:19         ` Aleksey Korotkov
2007-02-08 21:37           ` Damir Shayhutdinov
2007-02-09  4:12             ` Aleksey Korotkov
2007-02-09  6:45             ` Nick S. Grechukh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a4ab440f0702080752u347811dgc486098766e6f07a@mail.gmail.com \
    --to=gns@altlinux.ru \
    --cc=smoke-room@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Культурный офтопик

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/smoke-room/0 smoke-room/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 smoke-room smoke-room/ http://lore.altlinux.org/smoke-room \
		smoke-room@lists.altlinux.org smoke-room@lists.altlinux.ru smoke-room@lists.altlinux.com smoke-room@altlinux.ru smoke-room@altlinux.org smoke-room@altlinux.com
	public-inbox-index smoke-room

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.smoke-room


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git